Wordpress mysql cpu overload

January 4, 2015 1.5k views


I have a droplet with 320GB & 32GB RAM
My web is a wordpress with 2.000.000 pages/visited/month (300 average users in real time of Analytics)
We use Total Cache (before WP Cache)

Three times/day we have mysql cpu overload
IMG http://www.jotdown.es/content/example.jpg

Any explanation?

Sorry for my english

6 Answers

With that kind of volume you may need to spend money on a decent MySQL query analyzer to figure out which queries from WP (and WP plugins, most likely) are eating up your CPU cycles. For a cheap and quick (but powerful) first look at your problem, install mytop to see what your mysql and threads are doing while your system is running.

I've installed mytop.

Thank you very much.

In mysql-slow.log only appears this query many times:

SELECT count(*) as c FROM wpposts WHERE ID IN (SELECT objectid FROM wptermrelationships WHERE termtaxonomyid = 542)

Any idea?

Why is your droplet so massive? you don't need something that big for 300 concurrent visitors. I suggest you to start looking for holes in your droplet security, maybe is something else other than WP, do you have any other sites or php scripts running?

Yous MySQL is running on its own droplet? or into the same droplet as your website?
Also can you let us know more about your droplet environment, webserver, php version, mysql version, etc?
How is Total Cache configured?


My MySql is running into same droplet that my website

I dont have any other site or php scripts running.

Thank you for help

Have another answer? Share your knowledge.