Portal Home > Knowledgebase > Articles Database > PHP Defunct


PHP Defunct




Posted by articuno, 07-29-2010, 12:07 AM
I've searched this site extensively and every related thread delves into speculation and suggestion yet none got resolved to a point where I could apply a working solution to the problem. I've recently transferred from one dedicated box to another and my new server is down to a crawl due to [php] consuming CPU resources. It's mostly from one user with a vBulletin board but some of the processes are from WordPress installations as well. This never happened on my old server and is surprising since the new one is a considerable upgrade in terms of speed and memory. top (see attached screen as well) PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 29980 *** 16 0 0 0 0 Z 6.7 0.0 0:00.20 php 29981 *** 16 0 0 0 0 Z 6.7 0.0 0:00.20 php 29982 *** 16 0 0 0 0 Z 6.7 0.0 0:00.20 php 4180 mysql 34 19 477m 269m 4752 S 6.3 6.8 333:06.35 mysqld 29979 *** 15 0 0 0 0 Z 6.0 0.0 0:00.18 php 29978 *** 15 0 0 0 0 Z 5.7 0.0 0:00.17 php 28402 nobody 15 0 89400 6408 1980 S 0.7 0.2 0:00.09 httpd 29178 nobody 15 0 89400 6412 2008 S 0.3 0.2 0:00.05 httpd 29573 nobody 15 0 89268 6340 1972 S 0.3 0.2 0:00.02 httpd 29576 nobody 15 0 89268 6312 1960 S 0.3 0.2 0:00.01 httpd 29603 nobody 15 0 89268 6372 2000 S 0.3 0.2 0:00.01 httpd Specs are Core2Quad Q9400, 4 GB, CentOS 5.3, WHM 11, Apache 2.2 w/ suPHP It would be awesome to find out what server setting/configuration is causing such a high CPU load. Attached Thumbnails  

Posted by LnxtecH, 07-29-2010, 01:01 AM
May be a poorly coded php application under that user where the parent process is not terminating the child process.

Posted by Aigen_tech, 07-29-2010, 01:05 AM
Hi, Looks like a poorly coded application or the php compiled in the new box is not compiled in properly. You need to recompile php in the server to get this fixed. Contact your support to do it for you.

Posted by TonyB, 07-29-2010, 01:19 AM
What were you running on the previous server as far as PHP setup? suPHP every PHP request once it ends the PHP process has to be killed which is what the defunct PHP processes are. So if they were not on the previous machine then you most likely were running mod_php or even FastCGI.

Posted by UNIXy, 07-29-2010, 01:54 AM
Hi Articuno, It would be interesting to take a look at the server to see what the root cause is. It must be malformed opcode. Regards Joe / UNIXY

Posted by articuno, 07-29-2010, 02:31 AM
I know that both the old and new server use suPHP because I am able to edit files (inside wordpress for example) without ever manually setting file permissions. If defunct processes existed on the old server, they certainly never consumed this much, if any, CPU. I upgraded from an Athlon X2 6000 so things should be faster not dreadfully slow. The actual scripts users are running are not the problem. All of the accounts were automatically transferred over so nothing changed between old server and new. Also, the php processes occur from all sorts of php/mysql installations, vb, ipb, wp, etc. I've asked my host to recompile PHP as I don't know how to do that myself. To make matters worse, their support isn't that friendly.

Posted by articuno, 07-30-2010, 11:44 PM
The problem has been resolved. I had a faulty NIC card that continuously dropped packets, the firewall allowed an unlimited number of mysql connections per IP and PHP was improperly compiled. In the process I learned what iptables and ifconfig means. All's well that ends well.

Posted by indianboy, 07-31-2010, 04:14 AM
i am aving the similar kind of problem can u tell how u solved

Posted by tonim, 08-26-2010, 08:44 AM
I had a similar problem, was moving from one box to another (a better one) and after all of my websites were transferred the load on the new server was about 4.0, on the old one was 0.5 The solution for me was: Recompiling Apache - after this the load dropped to 1.5 Changing PHP 5 Handler from suphp to dso -after this the load dropped to 0.2



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
APF to block an IP (Views: 773)
about nginx and WHMCS? (Views: 804)
Order form? (Views: 49636)


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.