0

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.

cpbills
  • 2,692
  • 17
  • 12

2 Answers2

1

To answer my own question, it seems that the scoreboard is based on the ServerLimit instead of MaxClients. The Apache documentation is not really explicit about the default value of ServerLimit in case of prefork, which turned out to be 256.

0

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 or httpd -V depending on your distribution.

cpbills
  • 2,692
  • 17
  • 12
  • OK, I assumed that the MPM I had installed was the default one (can't quite remember switching). Just checked to be sure, so this Apache instance is running prefork. The question I had is separate from the problem I'm facing, in normal circumstances it shouldn't reach 150 and there's a bug out there in some PHP script I guess. I was just wondering about the scoreboard on the status page. – Bram Schoenmakers Jun 06 '11 at 06:31