[rabbitmq-discuss] Blocked connections on rabbitmq 2.2.0

Matthias Radestock matthias at rabbitmq.com
Fri Feb 4 16:58:12 GMT 2011


Ivan,

Ivan Sanchez wrote:
> Unfortunately when I tried to run 'rabbitmqctl list_queues memory' 
> during the problem it would never bring a result.

You may be suffering from one (or more) of the bugs we fixed in the
recent 2.3.x releases. I strongly recommend you upgrade.

> But you're right, it's possible queues got big in that node (clients 
> too slow, perhaps). If that's the case, is there a way to prevent the
>  server from running out of memory?

The server isn't running out of memory as such. It detects it is under
memory pressure and stops accepting new messages. Well before then it
will have started paging messages to disk. That will continue until
enough memory has been freed to resume accepting new messages again.

> In my context I'd rather drop unacknowledged messages than making the
> queue grow forever.

When consuming messages in noAck mode the server can forget about them 
as soon as it has sent them to the client. That creates the risk of 
losing potentially quite a lot of messages though in the event of a 
client or network failure, depending on how much buffering is taking 
place en route.

An alternative would be to configure per-queue message TTLs - see 
http://www.rabbitmq.com/extensions.html#queue-ttl

Both of these assume though that memory is taken up by 
delivered-but-unacknowledged messages, which is by no means certain. So 
I suggest that before trying either approach you a) upgrade to 2.3.1, 
and b) if the problem repeats use 'rabbitmqctl list_queues name 
messages_ready messages_unacknowledged' (it shouldn't block anymore in 
2.3.1) to determine which queues, if any, have many messages ready or 
waiting for acknowledgement.


Regards,

Matthias.


More information about the rabbitmq-discuss mailing list