1

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?

2 Answers 2

2

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

4
  • 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, 2009 at 20:00
  • Take a look at your maxClients settings in apache and maxThreads setting in the connector of your tomcat.
    – Christian
    Dec 28, 2009 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, 2011 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, 2011 at 11:01
1

Apparently you are using prefork apache model while:

http://tomcat.apache.org/connectors-doc/reference/workers.html

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .