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 have apache in front of Tomcat, using mod_rewrite and mod_proxy to relay requests while serving static content directly.

The Tomcat server can get bogged down and stop responding, or just plain crash. My problem is that in those cases it takes the apache httpd down with it. And it won't come back up even after I set Tomcat straight.

When this happens, the only way to get apache working again is to issue a stop command, then kill -9 remaining apache processes, and lately I also had to run ipcrm to remove semaphores, otherwise I get a "No space left on device" error.

My guess is that all of apache's workers become proxy threads, waiting to time out, while nothing else is being served.

I don't want to change the ProxyTimeout, because during normal operation, some requests can really take a long time. But I would like a way to tell apache to stop all the waiting proxy requests it has right now and start afresh.

Is there such a thing, or is there another way I should approach this?

I'm using ubuntu 8.04.

share|improve this question
up vote 1 down vote accepted

You could try using mod_jk rather than mod_proxy. mod_jk allows you to configure a maximum number of connections to your tomcat. In your file use:

worker.worker_name.connection_pool_size = 10

The value you use should be lower than the maximum number of connections in your Apache configuration. Hopefully, what should happen is that once that number of connections are waiting for tomcat, any more requests will return a 500 error, but you'd still have threads left to serve other requests.

There is a note saying that if you're using the prefork MPM, then you shouldn't set this value to higher than one, so this will only work if you're using the threaded MPM.

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.