cool999

Active Member
Jan 18, 2010
31
0
56
Sometimes the server load becomes too high and i see cpu usage and its always this process which is causing the load -

PHP:
 <defunct> 

any help on this

Thanks..
 

Tam

Well-Known Member
Jul 31, 2004
112
10
168
Take a look at the Daily Process Log under the Server Status section in WHM, maybe even paste the output here. It should show up resource intensive sites/users during the day (you can also see stats from previous days - find the link near the top of the page).

Otherwise ... while it is happening, copy the output from ps aux in SSH and paste it here ;)

PHP:
 <defunct> refers to a process that is now actually no longer running.
 

linux7802

Well-Known Member
Dec 14, 2007
232
1
68
cPanel Access Level
Root Administrator
One more query

I am not sure if daily monitoring help for this situation. As you can't found out the exact process which causing such issue.Check following top logs

527 olivl 20 0 0 0 0 Z 28.6 0.0 0:00.27 php <defunct>
2165 jacotb 20 0 0 0 0 Z 51.9 0.0 0:00.34 php <defunct>
2162 expma 20 0 0 0 0 Z 45.2 0.0 0:00.47 php <defunct>
3188 sccei 20 0 0 0 0 Z 20.0 0.0 0:00.33 php <defunct>
2380 nobody 20 0 0 0 0 Z 0.6 0.0 0:00.48 httpd <defunct>


You can see zombie is using large number of CPU on server but we can't found out the exact process. We would like some positive feedback from cPanel engineers to handle such problme on servers.We have already upgraded cPanel,Apache as well as php version to latest and secure version.

Awaiting for reply.
 

thecutecat

Registered
Dec 20, 2010
4
0
51
Can anybody tell me What will happen if I "kill" those "
PHP:
 <defunct> " process??  

Will the website down or something else?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
If the process is defunct, nothing should happen beyond removing the process in the list. The process isn't running any longer in that instance.
 

aff25768

Registered
Oct 18, 2011
4
0
51
cPanel Access Level
Root Administrator
You can kill the process by issueing command “ps aux | grep -i “defunc” | awk {‘print “kill -9 “$2′} | sh”, however, this is not a permanent solution.
From what i've read is that the root cause of this process is due to one of the bugs from apache on suphp module, normally what you should do is compile the apache and change the php mode from suphp to dso, everything should be working fine again after disabled suphp from the server. All depend if you want to change from suPhp - suPHP is great because it not only makes it more secure, it also allows you to see what is going on more easily. If a user is abusing the server with too much CPU time, you can easily track it with suPHP/suEXEC, but without suPHP/suEXEC it makes it a lot hard to investigate abuse issues.
You can refer to /http://blog.emyhost.com/2010/09/php-defunct-processes-causing-high-cpu-load/ for more information regarding the bugs.