Keep alive timeout not being respected on Amazon ELB

Amazon's ELB (Elastic Load Balancer) has an undocumented (except on forums) 60-second timeout which will tear down the connection if no data was sent. Hacking around by sending whitespace every 55 seconds seems like it'll work until they make this configurable.


The load balancer timeout, which closes the connection, is now documented:

To configure the idle timeout setting for your load balancer

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
  2. In the navigation pane, under LOAD BALANCING, click Load Balancers.
  3. Select your load balancer.
  4. In the bottom pane, select the Description tab.
  5. Find Connection Settings, and then click (Edit).
  6. In the Configure Connection Settings dialog box, enter a value for Idle Timeout. The range for the idle timeout is 1 to 3,600 seconds.
  7. Click Save.

The timeout for inactive connections is mentioned in the health check troubleshooting section: http://docs.amazonwebservices.com/ElasticLoadBalancing/latest/DeveloperGuide/ts-elb-healthcheck.html