Reputation: 111
I have a serious problem with RabbitMQ. After a certain amount of messages received, the consumers simply stop receiving messages. They are still connected but the are not receiving messages anymore. I have found other posts about this issue but none have a working answer.
Here is the connection wrapper I use: http://pastebin.com/XVY3HNGq. I use stormed-amqp which is an async amqp lib for python.
I have tried consuming messages without ack or with ack and a qos prefetch count of 100 (as indicated in several responses to this kind of problems).
When I do "rabbitmqctl list_queues name messages_ready messages_unacknowledged", I have a lot of ready messages and the "prefetch count" (100) value of unacknoledged message when using ack.
I really don't know wha'ts happening! Thank you for your answers.
Upvotes: 6
Views: 12474
Reputation: 189
while googling this issue I found this google discussion that sounds a lot like your problem.
https://groups.google.com/forum/#!topic/rabbitmq-discuss/DyJvFDnaVJ4
Upvotes: 1
Reputation: 1673
I've run into the same kind of problem (but with Java consumers) and realized that the cause was the rabbitmq server had run out of file descriptors (Ubuntu has 1024 by default). Try to increase the open files limit in linux on the machine that runs the rabbitmq server, for the user that runs the rabbitmq process. The way to increase those limits is described here: http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/
Cheers
Upvotes: 0
Reputation: 32392
I'll bet you are using Ubuntu or Debian and making do with the old, old version of RabbitMQ that they include. I had the same problems and they all went away when I installed RabbitMQ 2.31 or higher from rabbitmq.com.
Just say NO to old Ubuntu and Debian packages.
Upvotes: 0
Reputation: 15345
Looking at the code, I cannot see anything immediately wrong. Setting no-ack to True and setting the prefetch count to 0 should work fine. Are you sure your application hasn't crashed because of some exception? Is there anything special about the moment it freezes?
You may also want to try asking on the RabbitMQ Discuss mailing list. The developers usually answer all asked questions and several of them are familiar with the Python AMQP clients.
Upvotes: 0