ClickHouse:Kafka模式注册表的IP地址缓存持续多久?

huangapple go评论65阅读模式
英文:

Clickhouse: how long are kafka schema registry IPs cached for?

问题

我们正在使用Clickhouse的Kafka引擎,并使用format_avro_schema_registry_url设置,如此处所述。

一段时间后,我们在日志中看到以下错误信息(已删除IP):

Code: 1000. DB::Exception: Timeout: connect timed out: XXX.XXX.XXX.XXX:443: while fetching schema id = 1566: while parsing Kafka message

似乎我们三个Clickhouse节点中的一个已将kafka模式注册表的IP存储在某个地方,并且保留了太长时间,导致错误。

通过执行以下操作重新启动Clickhouse服务:

systemctl restart clickhouse-server

可以解决错误。是否有更好的解决方案?

英文:

We are using Clickhouse's Kafka Engine with the format_avro_schema_registry_url SETTING as described here.

After some time we see the following errors show up in the logs (ip removed):

Code: 1000. DB::Exception: Timeout: connect timed out: XXX.XXX.XXX.XXX:443: while fetching schema id = 1566: while parsing Kafka message 

It seems one of our three Clickhouse nodes has the IP of the kafka schema registry stored somewhere and is keeping it for too long. The IP changes, resulting in the error.

Restarting the Clickhouse service with:

systemctl restart clickhouse-server

makes the errors go away.

Is there a better solution?

答案1

得分: 1

你可以考虑使用以下设置在你的环境中禁用DNS缓存:
https://clickhouse.com/docs/en/operations/server-configuration-parameters/settings#disable_internal_dns_cache

还有一个SYSTEM DROP DNS CACHE命令可用于其中的某些操作:
https://clickhouse.com/docs/en/sql-reference/statements/system#drop-dns-cache

最后,DNS缓存更新周期由以下设置控制:
https://clickhouse.com/docs/en/operations/server-configuration-parameters/settings#dns_cache_update_period

英文:

You can consider disabling the dns cache in your environment with this setting:
https://clickhouse.com/docs/en/operations/server-configuration-parameters/settings#disable_internal_dns_cache

There also SYSTEM DROP DNS CACHE command for one of operations:
https://clickhouse.com/docs/en/sql-reference/statements/system#drop-dns-cache

Finally, the dns cache update period is controlled by this setting:
https://clickhouse.com/docs/en/operations/server-configuration-parameters/settings#dns_cache_update_period

huangapple
  • 本文由 发表于 2023年6月5日 10:48:23
  • 转载请务必保留本文链接:https://go.coder-hub.com/76403250.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定