Occasional CPU spike
I have 2 linodes, 1 Webserver & 1 database, both connected via Private IP. (separate Webserver-database setup)
i have very little traffic at the moment, but the problem is, i see occasional CPU spike in both linodes twice or trice a day. it reaches around 25/30%. sometime it reaches high as 50/60. and it stays for around 10/20 minute each time.
i dont have any cronjob set on these hrs, and i also monitored on those time, i didnt had any unusual traffic as well. on the moment of spike, i found out theres around 750/800 mysql quarries been inserted. is this normal?
check the screenshot
i have couple of mysql tables Indexed. is that could be the reason for it?
I have installed 1 wordpress, 2 php application on my linode.
thanks in advance.
1 Reply
It is also possible that the wordpress cron job is doing something via a plugin, running some cleanup function that accesses the database. So check your plugins.
You don't mention what the 2 php applications are, but they could also be running some kind of cleanup schedule.
Enable query logging and log all queries passed to the database, at least that way you'll see the actual queries, which will point to the source of the problem.
PS:
Also make sure the database listens on the private IP address and not on the public one!