Tomcat – Apache + mod_jk + tomcat: too many apache processes created

apache-2.2mod-jktomcat

I am using Apache + mod_jk + tomcat on my server and when I get many requests, especially with 404 responses (apparently it is scanning), I see many httpd processes started. When I shut down Tomcat these apache processes are shut too. Seems to be they are waiting for tomcat to release them or something.

This server is a test server and it is running on VDS and I have there a limit on number of processes.

So does any body know how to fix number of apache processes and don't allow to start new processes or just make tomcat to release them?

Best Answer

take a loog at this Apache doc: http://httpd.apache.org/docs/2.0/mod/mpm_common.html#maxclients With this you can regulate your maximum number of processes.

When your tomcat/app is working as it should tomcat releases the connection. Make sure your webapp is not blocking the connections by doing too long requests to a backend or something else.

Christian