Linode CPU spike causing server to crash

Hey.

I'm currently suffering from a few server crashes of late (3 in as many weeks) and they were all caused by a CPU spike (over 100%!). I haven't made any major changes or updates to my server in that time.

I want to fix the problem but I'm not exactly sure where to start. I've looked in nginx access logs but I don't think that will give me the answer..

Could someone please point me in the right direction? I've looked at the kern.log but I don't really know what I'm looking for (being a bit of a noob :lol: )

Any help will be GREATLY appreciated.

Thanks,

Alex

5 Replies

A CPU spike by a single process wouldn't impact the performance of your server, since you've got four processors (properly maxed out is 400%). More likely you're OOMing (running out of memory), which can cause the symptoms you describe (CPU spike and unresponsive system).

You're running nginx, so that tends to rule out the usual suspect (Apache). You might look at the syslog and check for out of memory errors. If that's the case, one thing that might be handy is to connect via SSH (or lish) and run 'top' sorted by memory (capital M key). That way, when the server dies, the last thing on the screen will be the most memory hogging processes.

Hey.

Thanks very much for your reply! Do you suggest running top constantly.. until it dies.. I suppose so as I can't predict when it will crash!

Al

That's what I'd do, but I'm no expert.

haha! me neither :D thanks !

If you did an upgrade before it started, you can try upgrading again after shutting down all your server software, or you can try to see about downgrading the memory hog reported by top (NOT recommended, much better to shut it down if you can, and replace it if possible and if upgrading again doesn't help).

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