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.

This Apache 2.2 configuration

<IfModule mpm_worker_module>
    StartServers          1
    ServerLimit           1
    MaxClients           60
    MinSpareThreads      25
    MaxSpareThreads      60
    ThreadsPerChild      60

gives

    1 89112 root           /Library/Apache2Front/bin/httpd -k start
89112 89115 _www           /Library/Apache2Front/bin/httpd -k start
89112 89117 _www           /Library/Apache2Front/bin/httpd -k start

1 process (root) and 2 processes (www)

Why 2 processes?

share|improve this question
    
I can't reproduce this. On OS X with MPM it only has one 'server' process: _www 18807 0.0 0.0 2438108 604 ?? S 1:03AM 0:00.00 /usr/sbin/httpd -D FOREGROUND -D WEBSHARING_ON root 18805 0.0 0.1 2438108 4352 ?? Ss 1:03AM 0:00.20 /usr/sbin/httpd -D FOREGROUND -D WEBSHARING_ON –  polynomial Aug 18 '11 at 8:07
    
Thanks for testing it. –  sive Aug 20 '11 at 10:11

1 Answer 1

Solved! By setting in httpd.conf LogLevel debug

Killing one of the www processes sh-3.2# ps ax | grep httpd 390 ?? Ss 0:00.11 /Library/Apache2Front/bin/httpd -k restart 391 ?? S 0:00.00 /Library/Apache2Front/bin/httpd -k restart 392 ?? S 0:00.00 /Library/Apache2Front/bin/httpd -k restart 439 s002 R+ 0:00.00 grep httpd sh-3.2# kill 391

[Sat Aug 20 12:09:03 2011] [error] cgid daemon process died, restarting

And from the Apache 2.0 manual On certain unix operating systems, forking a process from a multi-threaded server is a very expensive operation because the new process will replicate all the threads of the parent process. In order to avoid incurring this expense on each CGI invocation, mod_cgid creates an external daemon that is responsible for forking child processes to run CGI scripts.

share|improve this answer

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.