[rabbitmq-discuss] RabbitMQ 1.7.0 close the cnx when consumer don't ack deliveries during 30s
simon at rabbitmq.com
Wed Jul 14 10:30:35 BST 2010
On 13/07/10 16:00, Vincent Barat wrote:
> But from time to time, the database blocks during 30s to 1minute and
> thus I don't acknowledge during the same time.
> It seems that the RabbitMQ server closes the connection. Is there a
> timeout (or a setting) I can use to fix this issue ?
Hi Vincent. Not acking for 30s certainly should not close the
connection. When the server closes a connection due to client error it
sends an error message; you should see this as an IOException in the
Java client. Check the ShutdownSignalException inside the IOException to
get the error code / message. Alternatively you could look in the server
logs, sometimes there's more detail there.
One way this could be happening is:
* You have heartbeating turned on (I think some of the client version
have this turned on by default). Heartbeating makes the server
periodically check the client is still alive and responding.
* You block the connection main loop, say by implementing your own
Consumer rather than using QueueingConsumer, and doing something slow /
expensive in Consumer.handleDelivery().
Does this sound plausible? If not I would look for error messages as above.
Staff Engineer, RabbitMQ
SpringSource, a division of VMware
More information about the rabbitmq-discuss