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 a dedicated server runs debian 6, nginx 1.07, php 5.3 with php-fpm and percona mysql 5.1.

I just set up the server recently and only 1 site runs on it.

The problem I encounter is that even I have 10 php fastcgi processes set but 1 php5-cgi process consumes 100% cpu while the other 9 consume almost 0%. At this time, whole server is slow and so does the site.

share|improve this question
up vote 3 down vote accepted

You can try checking the exact script causing the CPU usage, by running:

ps faxuewwww

This way using the 'e' ps option, it will print out the environment variables for each process, also the php-cgi one. Most of the time there is plenty of useful info in env vars, to see which script is making the cpu usage.

share|improve this answer

A php-cgi stuck at 100% mean a stuck request (i.e.: an infinite loop), maybe you can check your error.log to find some info after that request will get killed when it reach the max_execution_time.

share|improve this answer
thanks giovanni, i haven't found error message in my error log files. Should I do some more configurations to php.ini or nginx.conf to grab the log? – AntiGameZ Oct 16 '11 at 17:53

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.