[rabbitmq-discuss] RabbitMQ hangs, does not accept connections

Simon MacMullen simon at rabbitmq.com
Fri Mar 9 12:37:10 GMT 2012


On 09/03/12 07:57, Dmitri Minaev wrote:
> Oh... Thanks. I thought, that if TCP connection is accepted, number of
> file descriptors should have no effect on the further events, since
> the socket already exists. Even now I can connect to port 5672 on that
> server, but AMQP does not respond.

I think at this point it hasn't actually allocated the FD, so it can't 
communicate.

> If I understand correctly, the number of file descriptors used by
> RabbitMQ in normal situation is roughly equal to the number of
> `rabbitmqctl list_connections` + some constant (~30)? In case of that
> hanging server, the number of AMQP connections never was close to the
> FD limit (ulimit -n is 1024, fs.file-max = 1605698). The graph
> reflecting  the number of open AMQP connections is attached to this
> message.

It's not really a constant, but to a first approximation, yes.

Ultimately, the error I saw being passed up from the OS was ENFILE - 
that's pretty unambiguous :)

It's possible that if you're churning connections then "closed" 
connections in FIN_WAIT2 could account for the majority of the used FDs. 
In 2.8.0 we'll set SO_LINGER to 0 to prevent this.

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, VMware


More information about the rabbitmq-discuss mailing list