[rabbitmq-discuss] Keeping idle connections alive in EC2

Laing, Michael michael.laing at nytimes.com
Tue Aug 27 11:49:11 BST 2013


We run lots of ec2 connections without problem and also use pika 0.9.13 or
0.9.14pre.

Some connections go idle for lengthy periods. We use the default heartbeat
of 600 secs for most connections.

If going through a load balancer like EC2's ELB or haproxy, we found a
heartbeat of 25 seconds worked well. At the current time we have engineered
load balancers out of our architecture by using AWS Route 53 least latency
/ weighted routing with health checks.

Our domain specific framework built on pika automatically reconnects if we
do lose a connection, typically trying a different machine in the cluster
via the above routing scheme. Inter- and intra-region shovel/federation
links do this explicitly using standard multi-endpoint configurations.

So I would try the default of 600 secs, i.e. don't specify a heartbeat, or
use 25 secs if a load balancer is in the picture.

ml


On Tue, Aug 27, 2013 at 4:21 AM, Michael Klishin <mklishin at gopivotal.com>wrote:

> slash:
>
> > I tried setting the connection parameter heartbeat_interval to both zero
> and 3600 and also the socket_timeout to 1860 seconds
>
> These are pretty high intervals. Have you tried setting heartbeats to,
> say, 20-30 seconds?
> --
> MK
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130827/027664bf/attachment.htm>


More information about the rabbitmq-discuss mailing list