• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

CPU stuck on WAIT, and apache and mysql hanged...

A

andor

Guest
Hi everyone!



I set up a LAMP server with a Plesk control panel, and from time to time its getting stuck with the CPU use 100% in WAIT state.


MySQL queries take ages to finish, and the http queries don't ever finish to stuck in the queue, so finally I'm getting like 100 or 200 http processes, and a stuck MySQL.

With a lot of difficulty I log on to the server, restart the apache and the mysql server, and it begins to be responsive again.

I've been checking the slowqueries on mysql, and I see some, but are very simple ones, so I think they're going slow because the server is stuck on "WAIT", and I think I don't see any unusual quantity of queries on the server.

How can I check what are my proccesses WAITing for? Is my hard disk doing something weird, maybe it's dying and when reading or writing on some position it gets stuck?

Thanks
 
you can get the PID of the process and try and do an lsof -p <pid> and see if you can see what its using. You can also set the hung_task_timeout_secs sysctl setting and see if that helps.
 
Back
Top