[rabbitmq-discuss] Problem while one of clients crashes.

Matthew Sackman matthew at rabbitmq.com
Fri May 13 12:36:23 BST 2011


Hi Krzysztof,

On Sun, May 08, 2011 at 09:48:20AM +0200, rabbitmq wrote:
> I'm using rabbit version 1.7.1,

Please don't. 1.7.1 is ancient. Please upgrade.

> I've observed a strange behavior.  When i have two consumers (A,B) and
> one of them (A) is closed unexpectedly (so without closing channel etc
> - for example forced shutdown) than the server still shows that two
> clients are connected, and is trying to send message to this
> terminated client (A).This results in having unacknowledged message in
> the queue. In most cases after some time this connection is timed out
> and message is returned to queue and processed by the other client
> (B).

Right, that sounds like a TCP FIN not getting through or some such issue
which is causing the server to keep the socket open until some timeout
occurs. You might try setting the heartbeat parameters on the
connections.

> But it also often happens that even though connection is timed
> out the unacknowledged message still remains and is blocking the other
> client (B). Other messages are waiting in the queue unconsumed. When
> new client  (C) is connected to server then all waiting massages are
> consumed by the new client. So there are two clients again (B,C). Now
> when the old client (B) is being closed and disconnected from server ,
> this unacknowledged message remains and starts blocking remaining
> client (C).  Messages are stuck in queue.
> 
> What could be the reason of such behavior? Maybe it is a known bug? Maybe some walk-arounds?

I'm afraid I've no idea. Thousands of bugs have been created and
possibly more fixed since 1.7.1. I have very little recollection of how
most things worked back then.

Matthew


More information about the rabbitmq-discuss mailing list