Connections to RabbitMQ are blocked

Kass 09
1 min readAug 7, 2014

--

This kept me busy the whole morning. My rabbitmq server was up but acted like it was dead. No messages going around, zero, nada! Trying to figure out what’s the problem, I noticed:

$rabbitmqctl list_connections
Listing connections …
guest 127.0.0.1 44192 blocking
guest 127.0.0.1 44193 blocked
guest 127.0.0.1 44194 blocked
guest 127.0.0.1 44195 blocked
guest 127.0.0.1 44196 blocked
guest 127.0.0.1 44197 blocked
guest 127.0.0.1 44198 blocked
guest 127.0.0.1 44199 blocked
…done.

All my connections were blocked! Restarting didn’t do anything. Reinstalling — Nothing again!

Hmm.. And here is the story:

‘There are two flow control mechanisms in RabbitMQ. Both work by exerting TCP backpressure on connections that are publishing too fast. They are:

A per-connection mechanism that prevents messages being published faster than they can be routed to queues.

A global mechanism that prevents any messages from being published when the memory usage exceeds a configured threshold or free disk space drops below a configured threshold.’

Hitting:

$rabbitmqctl status

I got:

 {vm_memory_high_watermark,0.4},
{vm_memory_limit,3126727475},
{disk_free_limit,1000000000},
{disk_free,895193088},

Bam! Problem found! In order to change the disk_free_limit parameter, we need to alter (or create) the rabbitmq.config file (The location of conf files differs for each OS).

My rabbitmq.config file:

[ 
{rabbit, [{disk_free_limit, [500000000]}]}
].

After restarting rabbitmq server, voila the connections are now open:

$rabbitmqctl list_connections
Listing connections …
guest 127.0.0.1 56235 running
guest 127.0.0.1 56236 running
…done.

--

--