Tomcat 6 HTTPS connector: keep alive timeout not being respected
Posted
by sehugg
on Server Fault
See other posts from Server Fault
or by sehugg
Published on 2010-03-07T20:56:27Z
Indexed on
2010/03/08
0:32 UTC
Read the original article
Hit count: 612
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)
© Server Fault or respective owner