The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[php] <defunct> CPU Process

Discussion in 'General Discussion' started by cool999, Jan 28, 2010.

  1. cool999

    cool999 Active Member

    Joined:
    Jan 18, 2010
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    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
    ..
     
  2. webstyler

    webstyler Well-Known Member

    Joined:
    Nov 20, 2003
    Messages:
    432
    Likes Received:
    0
    Trophy Points:
    16
    Interesting Question

    any info about this ?
     
  3. asiansexynine

    asiansexynine Member

    Joined:
    Feb 1, 2010
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
     
  4. Tam

    Tam Well-Known Member

    Joined:
    Jul 31, 2004
    Messages:
    103
    Likes Received:
    0
    Trophy Points:
    16
    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:
     <defunctrefers to a process that is now actually no longer running.
     
  5. linux7802

    linux7802 Well-Known Member

    Joined:
    Dec 14, 2007
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    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.
     
  6. darkelder

    darkelder Well-Known Member

    Joined:
    Oct 8, 2004
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    6
  7. thecutecat

    thecutecat Registered

    Joined:
    Dec 20, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Can anybody tell me What will happen if I "kill" those "
    PHP:
     <defunct" process??  

    Will the website down or something else?
     
  8. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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.
     
  9. aff25768

    aff25768 Registered

    Joined:
    Oct 18, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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.
     

Share This Page