- Problems keeping connections alive between Apache HTTP Server and Tomcat.
- When setting up mod_jk to connect to the Tomcat connection pool, JkOptions +DisableReuse is recommended
mod_jk has these built in health checks:
Both health checks send a PING to Tomcat. Tomcat responds with a PONG, at which point the connection is considered healthy and used.
In contrast, the DisableReuse option closes each connection after it has been used. This means two things:
- Establishing a new TCP connection is equally fast, if not faster, than PING/PONG, as it is handled at the kernel TCP implementation
- Threads on the Tomcat server are made available to handle requests from other httpd workers, or possibly other httpd servers
When using a connection pool with multiple httpd front ends, you must carefully balance connection pool settings and thread counts on the Tomcat server. The DisableReuse JkOptions setting bypasses the need to balance the connection pool and thread count settings.