Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm using Tomcat 6.0.24 on Ubuntu (JDK 1.6) with an app that does Comet-style requests on an HTTPS connector (directly against Tomcat, not using APR).

I'd like to set the keep-alive to 5 minutes so I don't have to refresh my long-polling connections. Here is my config:

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
           maxThreads="1000"  keepAliveTimeout="330000"
        scheme="https" secure="true"
           clientAuth="false" sslProtocol="TLS" />

Unfortunately it seems that the server closes the connection after 65 seconds. The pcap from a sample session goes something like this:

T=0   Client sends SYN to server, handshake etc.
T=65  Server sends FIN to client
T=307 Client sends FIN to server

(I'm guessing the 5 minute timeout on the client is due to the HTTP lib not detecting the socket close on the server end, but in any case -- the server shouldn't be closing the connection that early)

(edit: this works as expected when using the standard HTTP connector)

share|improve this question

2 Answers 2

up vote 7 down vote accepted

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.

share|improve this answer
(the timeout is still there, BTW .. jeesh) –  sehugg Oct 14 '10 at 3:33
still not configurable ... this is a pending issue since 2009 or so now ... –  Dennis Knochenwefel Nov 29 '11 at 15:17
Configurable till 1 hour now docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/… –  Peter Jul 28 '14 at 14:54

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.