Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

take a loog at this Apache doc: http://httpd.apache.org/docs/2.0/mod/mpm%5Fcommon.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

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

Your Answer

 
discard

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.