[rabbitmq-discuss] Dead but still established connections in RabbitMQ on EC2

Mathias Meyer meyer at paperplanes.de
Wed Feb 3 09:50:13 GMT 2010


we had an odd situation yesterday where we fired up an EC2 instance
with a Ruby-based client (using the EventMachine-based AMQP lib) that
connected to our Rabbit (also running on an EC2 host) using its
external IP address. Some time after the client connected its host got
a new (elastic) IP address assigned. One of the two active connections
from the old IP was dropped as Rabbit received an according exception
on it, but the other wasn't, and is still established according to
lsof -i and netstat almost 24 hours later. Problem is that Rabbit
apparently tried to deliver messages to these sockets and noone picked
up. The client that reconnected from the new IP in the meantime did
not get the messages, only when I killed it and restarted it.

We've had that situation twice already, and while there's some ways to
work around that I'm wondering if there's some way to work around
that, some configuration tweak (like heartbeats or something) so that
Rabbit will recognize dead connections and close them?

We're using 1.7 (will try updating to 1.7.1 later today) without any
particular configuration tweaks.

Any help or pointers would be much appreciated.

Cheers, Mathias
http://paperplanes.de | http://holgarific.net

More information about the rabbitmq-discuss mailing list