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.

Processes that continue for hundreds of hours.

Discussion in 'General Discussion' started by jols, Dec 31, 2005.

  1. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    Again we are finding that since the last cPanel update, we frequently discover one or two processes, usually FTP or MYSQL, that run for hundreds of hours, gradually eating up more and more CPU as time goes on.

    These processes have to be killed with the -9 option, e.g.

    kill -9 2232


    The loads that this kind of thing produces tend to generate complaints if we happen to miss this on one of our cPanel servers.

    I suppose I could stick on a bandaid by doing a cron that will reboot FTP and MYSQL every hour. But, really guys, this kind of thing just should not occur. Is there anything else we can do upgrade out of this bug, or to implement a fix here?

    We are currently running:

    WHM 10.8.0 cPanel 10.8.1-R30
    RedHat Enterprise 3 i686 - WHM X v3.1.0
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If something is chewing up resources you have to find out why. That is, MySQL have a look at what the MySQL children are actually doing (status). Check which resources the processes in question have open (lsof) and check what the actual process is doing (strace).
     
  3. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    Thanks for the reply Chirpy.


    Hmmm when attempting to run strace I get:

    /usr/bin/strace -p 23261
    attach: ptrace(PTRACE_ATTACH, ...): Operation not permitted

    Even though I am logged in as root. Perhaps this is due to some of the other security implementations that we have in place. (When I read "ptrace" it still causes a shutter in memory of the bygone Cobalt days, )

    Regarding lsof, interesting, but not very useful as it renders up tons of items. I am looking at the man page now to see how I can limit this listing to just mysql, for example.
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    ptrace can fail for various reasons - if the process is <defunct> or has since died you'll get a permission denied. I presume you have libcap installed? IIRC that's required to ptrace processes.
     
Loading...

Share This Page