Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am running MySQL on an Amazon Linux AMI. There is nothing connected to it. There are no connections and no other applications running that use MySQL. It is completely idle, but yet, top is reporting that mysql is using 62% of the CPU? Why is this happening and how do I fix it?

Cpu(s):  0.2%us,  0.2%sy,  0.0%ni, 97.8%id,  0.0%wa,  0.0%hi,  0.0%si,  1.7%st
Mem:   1738504k total,   390708k used,  1347796k free,    56888k buffers
Swap:   917500k total,        0k used,   917500k free,   229804k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2959 mysql     20   0  466m  39m 5244 S 62.2  2.3   4:00.67 mysqld
    1 root      20   0 19252 1504 1212 S  0.0  0.1   0:00.20 init
    2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd

There are no connections...

mysql> show processlist;
+----+------+-----------+------+---------+------+-------+------------------+
| Id | User | Host      | db   | Command | Time | State | Info             |
+----+------+-----------+------+---------+------+-------+------------------+
|  5 | root | localhost | NULL | Query   |    0 | NULL  | show processlist |
+----+------+-----------+------+---------+------+-------+------------------+
share|improve this question

1 Answer 1

up vote 10 down vote accepted

It is possible that your machine is effected by leap second bug.

Sat June 30th, 2012 - starting soon after the start of the day GMT. Servers in different datacentres as managed by different teams all go dark - not responding to pings, screen blank.

You can find more information about this from following link :

http://www.wired.com/wiredenterprise/2012/07/leap-second-bug-wreaks-havoc-with-java-linux/

Fix for this could be :

  1. Restarting ntp server : /etc/ini.d/ntp restart
  2. Set the date to current date : date -s "date"
  3. Or completely reboot the machine.

Hope, this will help solving your problem

share|improve this answer
    
yep. that seems to be the problem. thanks! –  Jeff Jul 1 '12 at 14:07

protected by sysadmin1138 Oct 6 '13 at 11:36

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.