rabbitmq+celery 内存泄漏?

发布于 2024-10-27 13:56:13 字数 564 浏览 1 评论 0原文

我已经在生产中愉快地运行了 celery+rabbitmq+django 一个月左右。昨天,我决定从 celery 2.1.4 升级到 2.2.4,现在rabbitmq 正在失控。运行一段时间后,evcam 不再识别我的节点,beam.smp 的内存消耗开始缓慢增加(100+% CPU 使用率)。

我可以运行 rabbitmqctl list_connections 并看到没有任何异常(只是我的一个测试节点)。我可以在rabbitmqctl list_queues -p中看到除了来自我的测试节点的心跳之外没有任何消息。如果我让这个进程继续运行几个小时,它就会使机器达到最大极限。

我尝试使用 camqadm 清除各种队列,但没有效果,stop_app 只是挂起。我发现“修复”它的唯一方法是在我的rabbitmq服务器上kill -9beam.smp(以及所有相关进程)和force_reset。

我不知道如何进行调试。就新消息等而言,似乎没有任何可疑之处。以前有人遇到过这种情况吗?有什么想法吗?我还应该查看哪些其他信息?

I have been happily running celery+rabbitmq+django for a month or so in production. Yesterday, I decided to upgrade from celery 2.1.4 to 2.2.4 and now rabbitmq is spinning out of control. After running for a while, my nodes are no longer recognized by evcam, and beam.smp's memory consumptions starts increasing...slowly (100+% CPU usage).

I can run rabbitmqctl list_connections and see that there is nothing unusual (just my one test node). I can see in rabbitmqctl list_queues -p <VHOST> that there are no messages except the heartbeat from my test node. If I let the process keep running over a couple of hours it maxes out the machine.

I've tried purging the various queues using camqadm to no avail and stop_app just hangs. The only way that I have found to 'fix' it is to kill -9 beam.smp (and all related processes) and force_reset on my rabbitmq server.

I have no idea how to go about debugging this. There doesn't appear to be anything fishy going on as far as new messages etc. Has anybody run up against this before? Any ideas? What other information should I be looking at?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

吾性傲以野 2024-11-03 13:56:13

celery开发者三个月前告诉我,RabbitMQ 2.1.1之后的版本受到了内存泄漏的影响,出现了cpu峰值。
我仍在使用2.1.1版本,没有这个问题

http://www.rabbitmq.com/releases/rabbitmq-server/v2.1.1/

celery 2.2.4版本引入了一些内存问题也是如此,但是如果你更新到celery 2.2.5大部分他们已经解决了。

http://docs.celeryproject.org/en/v2.2.5/changelog .html#fixes

我希望这能有所帮助

The celery developer told me 3 months ago that the versions of RabbitMQ after the 2.1.1 was affected by memory leak, with cpu peaks.
I'm still using the version 2.1.1 and I don't have this problem

http://www.rabbitmq.com/releases/rabbitmq-server/v2.1.1/

Is also true that the celery 2.2.4 version introduced some memory problem, but if you update to celery 2.2.5 most of them are solved.

http://docs.celeryproject.org/en/v2.2.5/changelog.html#fixes

I hope this could help

猫烠⑼条掵仅有一顆心 2024-11-03 13:56:13

可能没有帮助,但我们最近在 Java 虚拟机中发现了与用于监视垃圾收集的扩展相关的内存泄漏。您的心跳监视器可能正在触发这些方法,从而导致本机内存泄漏。

该问题如下所述: https://bugs.java.com/bugdatabase/view_bug? bug_id=7066129

May not be helpful, but we recently tracked down a memory leak in the Java Virtual Machine related to the extensions used to monitor garbage collection. It may be that your heartbeat monitor is triggering these methods, which result in a native memory leak.

The issue is described here: https://bugs.java.com/bugdatabase/view_bug?bug_id=7066129

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文