英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论