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.


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.


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.

  • 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? – Alex Chen Oct 16 '11 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.