Portal Home > Knowledgebase > Articles Database > Lots of PHP Processes
Lots of PHP Processes
|Posted by dlewis23, 09-01-2010, 11:34 PM|
|I'm having a problem with high server load on a cpanel VPS and I've started noticing that I have a ton of PHP Processes. I have never seen so many php processes and I'm starting to believe they are what is causing my high server.
I would like to know if its normal to have this many php processes? They seem to be the only real thing using up CPU usage.
|Posted by harget, 09-01-2010, 11:41 PM|
|It looks like the PHP process is creating new processes to serve the requests that the server is receiving.
|Posted by InstaCarma_Support, 09-02-2010, 01:56 AM|
|This much of php instances is not normal. You need to check, what exactly is causing this. Using the process id, you can get from where concerned process is getting executed.
ls -al /proc/processid
Also, is there any cronjob set ?
|Posted by activelobby4u, 09-02-2010, 02:37 AM|
|take a look at the files for the user uploadin and you might find something interesting
|Posted by Techbrace, 09-02-2010, 05:15 AM|
|As you're running PHP as CGI, you're bound to see such things if your websites with php scripts get too many hits or the PHP scripts do not exit cleanly or it takes longer to exit. Run 'top -c' instead of just 'top' and see which PHP scripts are running on the server.
If you want to get rid of the high load on the server due to PHP scripts, you may recompile Apache with PHP as a module.
|Posted by dlewis23, 09-02-2010, 10:09 AM|
|Thank you that seemed to work. My load went from over 50 to around 1. I changed it to DSO. But someone was saying that changing it to DSO can be a security risk and I wanted to know if that is true?
|Posted by Techbrace, 09-02-2010, 10:26 AM|
|No problem, HTH :-)
Yeah, It's a security risk on shared environments. You need to have nobody writable dirs for uploads and If one website on the server is vulnerable, it would affect other websites that have got nobody writable dirs. However, with powerful script platforms like PHP, you'll never be 100% safe.
Having said that, if yours is a dedicated environment, having suexec can backfire. If any of your web application is vulnerable, whole your account, even outside your document_root, will be affected.
You should select the solution that's best suited to your environment. Because the best solution varies from people (one environment) to people (another environment).
|Posted by MrSaints, 09-02-2010, 10:40 AM|
|Recompile with an MPM as well and recycle your idle processes
Add to Favourites Print this Article