mysqld running at 400%+ cpu

My server is constantly showing 400-500% cpu usage

the culprit seems to be mysqld, which is runnign at 400%.

if i restart it, it jumps straight back upto 400%.

the site is not getting a lot of traffic at all.

any help is appreciated

5 Replies

What OS distro are you running? What version of MySQL? What type of site?

Giving us some good information about what you're doing will help us help you.

what does "show processlist" say on a mysql prompt?

Have you enabled the slow query log? If so what does it contain?

Ubuntu 13.04

its a Linode 8192

Its a site running Magento

mysql> SHOW VARIABLES LIKE "%version%";

+–-----------------------+-----------------------------+

| Variable_name | Value |

+-------------------------+-----------------------------+

| innodb_version | 5.5.34 |

| protocol_version | 10 |

| slavetypeconversions | |

| version | 5.5.34-0ubuntu0.13.04.1-log |

| version_comment | (Ubuntu) |

| versioncompilemachine | x86_64 |

| versioncompileos | debian-linux-gnu |

+-------------------------+-----------------------------+

mysql> show processlist;

+----+------------------+-----------+------------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+

| Id | User | Host | db | Command | Time | State | Info |

+----+------------------+-----------+------------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+

| 69 | root | localhost | NULL | Query | 0 | NULL | show processlist |

| 80 | expertelectrical | localhost | expertelectrical | Query | 0 | Sending data | SELECT seonavigation.* FROM seonavigation WHERE (seonavigation.query_params='a:5:{s:12:\"pro |

| 81 | expertelectrical | localhost | expertelectrical | Query | 0 | Sending data | SELECT seonavigation.* FROM seonavigation WHERE (seonavigation.request_path='power-supplies- |

+----+------------------+-----------+------------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+

3 rows in set (0.00 sec)

slow query log simply show:

/usr/sbin/mysqld, Version: 5.5.34-0ubuntu0.13.04.1-log ((Ubuntu)). started with:

Tcp port: 3306 Unix socket: /var/run/mysqld/mysqld.sock

Time Id Command Argument

My guess is you are getting traffic from somewhere.

Check your Apache logs, see who is visiting what.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct