Processes that continue for hundreds of hours.

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
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
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
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).
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
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.
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
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.