phreek.org


Friday, January 16, 2009

mysqld_safe using high or 100% CPU

Both my network monitoring servers suffered this condition over the 2wks my company takes holidays for Christmas so I returned to work to find 2 VMs consuming 6ghz of CPU between them. A quick check of top showed mysqld_safe consuming 100% CPU on both VMs for no apparent reason.

After trying the usual /etc/init.d/mysql restart with no success, Google was my friend yet again. Turns out this is a common problem with MySQL 5.0.51 on Ubuntu so the procedure to recover is:

sudo /etc/init.d/mysql stop
sudo killall -9 mysqld_safe
sudo /etc/init.d/mysql start

In my journeys through many forums and blogs, I also discovered a great tool to help with MySQL performance issues: mytop. Basically it’s like the normal *nix “top” command, except for MySQL so you can see queries etc as they run.

Posted by darko (0) Comments | Permalink
Next entry: How to resume a Linux terminal session after hitting CTRL-S Previous entry: Installing a Windows XP Guest on ESX or ESXi 3.5

Post a comment

Name:

Email:

Location:

URL:

Remember my personal information

Notify me of follow-up comments?