If you take a look at RabbitMQ log you'd likely find messages about abruptly
closed connections roughly 200 seconds after the connections were accepted.
What you're seeing in the management UI is RabbitMQ heartbeat timeout: a period
of time after which RabbitMQ and client alike should consider the peer dead. This includes
2 skipped heartbeat frames. In other words, RabbitMQ and a correct client should
send a heartbeat frame roughly every [1/2 the heartbeat timeout] seconds.
That makes it ~ 290 seconds by default (which is your case). Your HAproxy timeouts
are set to 200 seconds. Which means that if there is no other activity on open connections,
HAproxy will consider it stale and close it after 200 seconds.
It's not hard to tell what the solution should be: either decrease heartbeat interval (say, to 10-20
seconds) for your clients or bump HAproxy timeouts to at least 300 seconds.
--
MK
Staff Software Engineer, Pivotal/RabbitMQ