[rabbitmq-discuss] behavior when client socket close

Marek Majkowski majek04 at gmail.com
Fri Sep 16 14:57:50 BST 2011


On Fri, Sep 16, 2011 at 14:17, Aaron Westendorf <aaron at agoragames.com> wrote:
> Opposite direction; the clients where turned off, rabbit continued
> serving our infrastructure.
>
> This is an important problem for us because our monitoring tools freak
> out when the running clients do not match the number of connections
> reported by rabbit.

Understood. If you kill the client process, operating system should
close tcp/ip connections and will notify the rabbitmq server about
it.

If the whole client machine dies... that's a different story. RabbitMQ
will fall back to usual tcp/ip mechanisms to detect failure. And it can
take a while for tcp/ip to detect a broken connection.

> If the problem is not in our networking setup, then it likely lies
> somewhere between linux and rabbit. When I've written epoll network
> apps, I've found that I always am notified of a read event when the
> socket closes, and then if no data is read, the socket is closed. I'm
> wondering if rabbit is making that assumption as well, because if it
> is, then the problem lies elsewhere.

Possible workarounds:
 - use tcp/ip keepalives
 - use amqp heartbeats

Marek


More information about the rabbitmq-discuss mailing list