I installed Apache 2.2 from the Debian repository (6.0/Squeeze). By default, Debian installs the prefork module and comes with the following (default) configuration:
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
Looking at the scoreboard on the status page, I see there are 256 workers available:
Current Time: Sunday, 05-Jun-2011 22:50:00 CEST
Restart Time: Saturday, 04-Jun-2011 05:49:50 CEST
Parent Server Generation: 3
Server uptime: 1 day 17 hours 9 seconds
Total accesses: 208737 - Total Traffic: 4.6 GB
CPU Usage: u1.08 s.18 cu0 cs0 - .000854% CPU load
1.41 requests/sec - 32.6 kB/second - 23.0 kB/request
1 requests currently being processed, 9 idle workers
.______W__.._...................................................
................................................................
................................................................
................................................................
I wonder whether it actually is 256, since the list of requests ranges from 0 to 149. Due to a (yet-to-be-discovered) bug, Apache grinds to a halt with 150 active servers, which matches the MaxClients
setting. I wonder if the display with 4 rows of 64 characters is misleading and should display 150 characters in total.
To answer my own question, it seems that the scoreboard is based on the
ServerLimit
instead ofMaxClients
. The Apache documentation is not really explicit about the default value ofServerLimit
in case of prefork, which turned out to be 256.apache2 comes, by default (assuming you used
apt-get install apache2
) in Debian Squeeze (6.0) compiled for the Worker MPM model.if you need or want the prefork MPM model,
apt-get install apache2-mpm-prefork
the configuration block you are referring to in your question are conditional options for the prefork MPM model, and does not imply the prefork MPM is being used.
MPM Prefork, too many apache2 process? is another ServerFault question dealing with similar issues.
you can find the MPM model with:
apache2 -V
orhttpd -V
depending on your distribution.