RabbitMQ服务器在启动后不久就关闭了

时间:2014-03-26 03:32:58

标签: rabbitmq celery

我在保持RabbitMQ方面遇到了一些麻烦。

我通过提供的/etc/init.d/rabbitmq-server start启动它,它启动正常。 status表明没关系。

但过了一会儿,服务器就死了。 status打印

Error: unable to connect to node 'rabbit@myserver': nodedown

检查日志文件,似乎我已达到内存阈值。这是日志:

    # start
=INFO REPORT==== 26-Mar-2014::03:24:13 ===
Limiting to approx 924 file handles (829 sockets)

=INFO REPORT==== 26-Mar-2014::03:24:13 ===
Memory limit set to 723MB of 1807MB total.

=INFO REPORT==== 26-Mar-2014::03:24:13 ===
Disk free limit set to 953MB

=INFO REPORT==== 26-Mar-2014::03:24:13 ===
Management plugin upgraded statistics to fine.

=INFO REPORT==== 26-Mar-2014::03:24:13 ===
msg_store_transient: using rabbit_msg_store_ets_index to provide index

=INFO REPORT==== 26-Mar-2014::03:24:13 ===
msg_store_persistent: using rabbit_msg_store_ets_index to provide index

=WARNING REPORT==== 26-Mar-2014::03:24:13 ===
msg_store_persistent: rebuilding indices from scratch

=INFO REPORT==== 26-Mar-2014::03:24:27 ===
started TCP Listener on [::]:5672

=INFO REPORT==== 26-Mar-2014::03:24:27 ===
Management agent started.

=INFO REPORT==== 26-Mar-2014::03:24:27 ===
Management plugin started. Port: 55672, path: /

=INFO REPORT==== 26-Mar-2014::03:24:39 ===
accepting AMQP connection <0.1999.0> (127.0.0.1:34788 -> 127.0.0.1:5672)

=WARNING REPORT==== 26-Mar-2014::03:24:40 ===
closing AMQP connection <0.1999.0> (127.0.0.1:34788 -> 127.0.0.1:5672):
connection_closed_abruptly

=INFO REPORT==== 26-Mar-2014::03:24:42 ===
accepting AMQP connection <0.2035.0> (127.0.0.1:34791 -> 127.0.0.1:5672)

=INFO REPORT==== 26-Mar-2014::03:24:46 ===
accepting AMQP connection <0.2072.0> (127.0.0.1:34792 -> 127.0.0.1:5672)

=INFO REPORT==== 26-Mar-2014::03:25:19 ===
vm_memory_high_watermark set. Memory used:768651448 allowed:758279372

=INFO REPORT==== 26-Mar-2014::03:25:19 ===
    alarm_handler: {set,{{resource_limit,memory,'rabbit@myserver'},
                         []}}

=INFO REPORT==== 26-Mar-2014::03:25:48 ===
Statistics database started.
    # server dies here

我似乎已达到内存阈值,但是读取docs,它不应该关闭服务器?只是在某些内存被释放之前阻止发布?

是的,我知道我的芹菜工作者内存使用的原因,我只是认为RabbitMQ会正确处理它,文档似乎暗示了这一点。所以我做错了什么?

编辑:重构我的任务,因此它的消息只是一个字符串(最多15个字符)。似乎没有任何区别。

我尝试启动RabbitMQ和celery worker --purge,没有任何事件可以触发任务,但似乎RabbitMQ的内存使用率仍然稳步攀升至40%。然后不久就崩溃了。它崩溃了,我的任务都没有机会运行。

1 个答案:

答案 0 :(得分:0)

将RabbitMQ更新为官方稳定版本修复了该问题。 Ubuntu 12.04存储库中的RabbitMQ包真的旧。