Occasional CPU spike

Hello,

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

http://imgur.com/iF1h80l

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

That is not normal… are you sure your wordpress is not being hammered by a brute force attack? (like a bot hitting the login/registration/comments/RPC urls). Check the web server logs for possible attacks during the high cpu usage.

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!

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