[rabbitmq-discuss] Socket errors and connections not closing

Mark Westling westling at perceptech.com
Wed Aug 12 06:46:14 BST 2009

Hi Mattias,
Many thanks for the reply.

Did you check with lsof/netstat on the *client* machine whether the sockets
> are really dead there?

Yes -- the client ports that lsof reports open on the RabbtMQ server machine
aren't listed in the client machine; for example, on the server I can see:

beam.smp 22933 rabbitmq   23u  IPv4 44493222       TCP> (ESTABLISHED)

but on the client machine ( I don't see a socket from port 33748.
 Right now, if I count the total number of sockets with port 5672 and grep
for the address of the other machine, I see 28 connections on the client and
49 on the server (including the one I listed above).

> Also, are these connections going via some kind of firewall or
> loadbalancer? If so, perhaps the connections to the server are kept open
> there.

I started to type "no" but then decided to confirm this and turns out that
the connection does indeed go through a firewall.  I tend to think of
firewalls as just blocking ports, but you're right -- perhaps there's more
going on.  I've asked a network engineer to check the configuration.

>  If that fails, is there a configuration option that lets RabbitMQ close
>> broken connections?
> AMQP's heartbeat mechanism is designed precisely for this situation. The
> heartbeat frequency is negotiated between the client and the server at
> connection establishment. I don't know anything about the Ruby client, but I
> am assuming from the above that it disables heartbeats. If so, try to find a
> way to enable them.

 Coincidentally, the developer of the interface library I'm using announced
this morning that the latest version includes a heartbeat parameter.  I'll
try that as soon as possible.

Thanks again,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090812/62b75557/attachment.htm 

More information about the rabbitmq-discuss mailing list