I have Apache httpd with mod_jk. I have issue with killed connections after long idling period: Apache stops to respond and each HTTP request hangs for 15 minutes. I tried turn off mod_jk connection pooling (with DisableReuse) and the issue disappears.

In the Tomcat documentation it is written:

Using this option will have a strong performance penalty for Apache and Tomcat. 
Use this only as a last resort in case of unfixable network problems. 
If a firewall between Apache and Tomcat silently kills idle connections, 
try to use the worker attribute socket_keepalive in combination with 
an appropriate TCP keepalive value in your OS.

I tried to use socket_keepalive=true, it became better, but still sometimes HTTP request hangs for 15m.

So it seems like without socket_keepalive 90% of connections are dead, with socket_keepalive 10%, with DisableReuse 0%.

The OS is RedHat Enterprise 6.5. What is appropriate TCP keepalive value? and How it should be configured in my OS to make socket_keepalive works properly?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.