芹菜心跳缺失(在节点上)

2024-10-02 06:28:50 发布

您现在位置:Python中文网/ 问答频道 /正文

我刚升级到芹菜3.1,现在我看到我的日志:

on_node_lost - INFO - missed heartbeat from celery@queue_name for every queue/worker in my cluster.

根据文档,BROKER_HEARTBEAT在默认情况下是关闭的,我还没有配置它。

我应该显式地设置BROKER_HEARTBEAT=0还是应该检查其他内容?


Tags: namefrominfonodeforqueueonbroker
3条回答

我也有类似的问题。我找到了我案子的原因。

我有两台服务器运行worker。

当我对另一台服务器使用“ping”时, 我发现当ping时间大于2秒时,日志会显示“missed heartbeat from celeri@”。默认心跳间隔为2秒。

原因是我的网络不好。 http://docs.celeryproject.org/en/latest/internals/reference/celery.worker.heartbeat.html

芹菜3.1增加了新的混合和八卦程序。我也被错过了很多次心跳,没有跟我的员工闲聊就过去了。

http://docs.celeryproject.org/en/latest/whatsnew-3.1.html#mingle-worker-synchronizationhttp://docs.celeryproject.org/en/latest/whatsnew-3.1.html#gossip-worker-worker-communication

看到了同样的事情,并注意到日志文件中的一些事情。

1)日志开始时有关于时间漂移的消息,偶尔有心跳丢失。

2)日志文件结束时,漂移消息消失,只出现丢失的心跳消息。

3)当漂移信息消失时,系统没有变化。。。他们就不来了。

我想漂移本身很可能就是问题本身。

同步所有相关服务器上的时间后,这些消息就消失了。对于ubuntu,运行ntpdate作为cron或ntpd。

相关问题 更多 >

    热门问题