[rabbitmq-discuss] Noticed way too many open connections

Michael Klishin mklishin at gopivotal.com
Mon Dec 2 21:59:38 GMT 2013


On 3 Dec 2013, at 01:10, cw storm <cwstorm at gmail.com> wrote:

> So if I set heartbeat timeout, if the specific conn/channel hasn't been closed for a specified time, then the rabbit server will close that connection/channel, right?  Is there any harm in putting this in the code?  I want to make sure that this is good practice and such.

Hearbeats allow RabbitMQ and compliant clients detect peer disappearance quicker
(than via TCP connection closure). It only affects connections.

There is no harm in using heartbeats, just make sure that the value is not too high
or two low. Lower values means quicker connection loss detection but increase network traffic
and slightly increase server load per connection.
Heartbeat frames will be sent at roughly half the interval (so, if the timeout is set to
100 seconds, a little bit of data will be sent every ~50 seconds from both ends). After
two missed heartbeats (full interval duration), RabbitMQ will consider the connection closed.

Unless you have hundreds of connections, any value between 60 and 180 should be fine.

MK

Software Engineer, Pivotal/RabbitMQ




More information about the rabbitmq-discuss mailing list