Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

take a loog at this Apache doc: 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.


share|improve this answer
Thanks. Regarding long requests to backend - this is not an issue. I see the problem only in lots of 404 errors, thus there is no backend involved. So the problem is some where in number of process which is under apache server or tomcat or in-between, i.e. mod_jk – Stas Dec 25 '09 at 20:00
Take a look at your maxClients settings in apache and maxThreads setting in the connector of your tomcat. – Christian Dec 28 '09 at 14:05
Do MaxClients and maxThreads need to be equal or..? Got more or less an issue like this with MC=300, mT=150. – Henk Jun 13 '11 at 19:03
@Henk: Sure. With MaxClients 300 and maxThreads 150, your Apache can handle 300 Connections, but your Tomcat only 150. When you get more than 150 simultaneous connections to your Apache, your Tomcat will get in trouble. – Christian Jun 28 '11 at 11:01

Apparently you are using prefork apache model while:

Do not use connection_pool_size with values higher then 1 on Apache 2.x prefork or Apache 1.3.x!

Add into line with JkOptions +DisableReuse

+DisableReuse will disable pool and fix your issue.

It should fix SYN_RECV or RECV issue at tomcat side.

share|improve this answer

Your Answer


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.