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 as backend server for nginx. Here is my config for prefork MPM which i use:

StartServers          1
MinSpareServers       1
MaxSpareServers       5
MaxClients           10
MaxRequestsPerChild   0

So as you can see, MinSpareServers is 1, which means that apache will kill all idle processes until there is only one. When i restart my server - its ok, in system only 2 apache processes (parent and child). After i load page, apache begin spawn childs, and when page is loaded - there is 5 childs of apache. Load on my server is very low, so i think that there is no reason for additional childs. How can i make apache work right ?

share|improve this question
up vote 1 down vote accepted

Apache is working exactly as expected. The Prefork MPM works on the one process per request principle.

Your browser uses around 8 concurrent connections to load a page in parallel. Therefore 8 processes will be started on your server until the request is complete and the browser disconnects. The parent server will see that there are unused servers that exceed your MaxSpareServers directive and kill 3 of them to bring it inline with your configuration.

You want child processes to exist before a connection has arrived from a client. It speeds everything up. It's not a bad thing.

share|improve this answer

If there are more than MaxSpareServers idle, then the parent process will kill off the excess processes. What you're doing doesn't make sense unless it's a embedded system with very little memory available.

share|improve this answer

You have MaxSpareServers set to 5, this is the number you need to tune as it is the maximum number of idle servers that are allowed. If there are more than MaxSpareServers idle, then the parent process will kill off the excess processes.

The lowest number you can set MaxSpareServers to is MinSpareServers +1.

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.