LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Tons of PHP processes on CENTOS 6.4 x86_64 (https://www.linuxquestions.org/questions/linux-server-73/tons-of-php-processes-on-centos-6-4-x86_64-a-4175469336/)

dch921 07-11-2013 08:10 PM

Tons of PHP processes on CENTOS 6.4 x86_64
 
I have had a dedicated sever with hostgator running CENTOS 6.4 x86_64 and using fcgi-php. Its been up and running 1 site for about 2 months now. Just migrated another user from shared hosting to the dedicated server and now that user is bring to server to a crawl. Their site is a wordpress blog with maybe 30K pageviews a month.

When I ssh into the server I am seeing 20 - 40 php processes running. These are eating up all the system resources to the point of making the server nearly unresponsive forcing me to reboot the server.

I have tried to limit the number of processes running by that user using /etc/security/limits.conf which doesn't seem to make a different.

I have search and search the web and tried changing fcgi configurations to limit the processes also with no help.

I'm not sure how to track down what is causing all these php processes to pop up and how to prevent it. Any help would be great.

j-ray 07-12-2013 01:44 AM

Maybe you better run PHP as an apache module instead? I found some info regarding this topic. Hope this helps...

http://wpguru.co.uk/2012/02/the-prob...i-application/

Cite from that site:
Quote:

The Solution

The reason this seems to be happening is that FastCGI is running low on memory. By default the Apache configuration does not include a statement to allocate enough memory, but we can do this by adding the following line to httpd.conf (thanks to Baldock for this tip):

FcgidMaxRequestLen 33554432

Restart Apache with “service httpd restart” and all your troubles go away.
Cheers,
j


All times are GMT -5. The time now is 02:41 AM.