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'm running apache 2.2 with PHP 5.2 in FastCGI mode with mod_fcgid. The platform is RedHat Enterprise Linux 5.5 x86_64. I have my minimum and maximum fastcgi slaves set to 35. How do I track how many php-cgi processes are busy at a certain point in time? I want to see if I'm running out of php-cgi processes and need to increase the number of processes running. I can use "ps" to see how many processes are running, but not how many are busy. How can I see if Apache is blocking on a free php-cgi process?

share|improve this question
up vote 0 down vote accepted

You can parse it from mod_status page:

busy_workers=`lynx -dump | awk '/BusyWorkers/ { print $2 }'`
share|improve this answer
Thanks, but this would only work if I was using mod_php, where each apache process has a PHP interpreter. I'm using PHP as a FastCGI process pool with mod_fcgid. When using FastCGI, the number of Apache workers is a different pool from the number of PHP workers/processes. PHP processing doesn't happen within the Apache process with this method. This setup improves performance and reduces memory usage. – edgester Aug 25 '11 at 17:03
mod_status also supports FastCGI: – quanta Aug 26 '11 at 7:02
Do I need to enable ExtendedStatus for that to work? – edgester Aug 26 '11 at 18:14
No, you don't. ExtendedStatus On give you extra info: Total Accesses, Total kBytes, ... – quanta Aug 27 '11 at 2:54
Sigh. I still don't see anything on the status page regarding FastCGI or fcgid. I guess I don't that patch isn't in my version of Apache. – edgester Aug 27 '11 at 14:07

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.