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.

We're currently using a hardware load balancer, which then goes to Apache and that then goes to Tomcat 5.5 via the AJP connector.

We've decided to dump apache for various reasons - In our current system it doesnt provide any advantage.

However when I look at the headers sent when we do this, the "Keep-Alive: timeout=15 max=96" header doesnt get sent when you use the tomcat http connector

Interestingly, i can find no documentiation on "keepalivetimeout" for tomcat5.5, but i can for tomcat6. But neither can i find evidence that tomcat5.5 doesnt support this setting.

here's my connector:

<Connector port="8090" maxHttpHeaderSize="8192"
               maxThreads="400" minSpareThreads="150" maxSpareThreads="300"
               enableLookups="false"
               connectionTimeout="2" maxKeepAliveRequests="400" disableUploadTimeout="true" />

So; Is there any way I can specify the keepalive timeout if we use the http connector with tomcat 5.5, and force this header entry to be sent?

Just to be clear - the exact header entry i see back from the server is this with apache:

Keep-Alive: timeout=2, max=100

But nothing from tomcat/coyote.

I've looked at this some more, and I dont think the Keep-Alive header entry really matters. The problem seems to be that keep-alives are simply not supported in tomcat 5.5 http connector? They do seem to work in tomcat6 (+java 6).

Thanks, Dan

share|improve this question

1 Answer 1

you were heading in the right direction. in tomcat 5.5 connectionTimeout is the same as keepalivetimeout in tomcat 6.0. but you should change the value from 2 to 2000, as the tomcat value is in milliseconds and the apache value is in seconds.

you are right as you don't see the timeout value in the http headers send by your tomcat. but the timeout will take action on the server side. i asume it is not send as the tomcat connector is HTTP/1.1 and the Kee-Alive: timeout=X, max=Y is HTTP/1.0. as the tomcat documentation tells, you should synchronize the timeout values on both sides, loadbalancer and tomcat in your case.

share|improve this answer

Your Answer

 
discard

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.