OOMing; no idea how to find the culprit, help!

Hi all,

Switched my website to Linode from a fairly big hosting company thinking it was going to help reduce downtime and give me more peace of mind.

My experience is quite the opposite, as I've had multiple server attacks and have had to do plenty of security patching since switching to Linode.

All throughout our time with Linode, I've always had the site go down periodically. I'd peg it at perhaps once every two weeks the site will go down and I'll have to reboot the Linode. The site isn't one that gets a ton of traffic… so I'm unsure as to what the cause is.

Opening up a support ticket and got this response. Helpful… but I have zero idea what any of it means. Can anyone help?!

Thanks

Judging from the console of your Linode's previous session, your Linode is OOMing, meaning something inside your node is consuming all of the available virtual memory. I've pasted the error messages below for your convenience:


Out of memory: Kill process 14760 (mysqld) score 56 or sacrifice child

Killed process 14760 (mysqld) total-vm:345404kB, anon-rss:17476kB, file-rss:0kB

Out of memory: Kill process 13214 (apache2) score 32 or sacrifice child

Killed process 13214 (apache2) total-vm:74288kB, anon-rss:16432kB, file-rss:56kB

Out of memory: Kill process 13209 (apache2) score 32 or sacrifice child

Killed process 13209 (apache2) total-vm:74112kB, anon-rss:6356kB, file-rss:108kB

Out of memory: Kill process 13212 (apache2) score 31 or sacrifice child

Killed process 13212 (apache2) total-vm:73252kB, anon-rss:3492kB, file-rss:152kB

Out of memory: Kill process 14645 (apache2) score 30 or sacrifice child

Killed process 14645 (apache2) total-vm:72212kB, anon-rss:8688kB, file-rss:0kB

Out of memory: Kill process 14658 (apache2) score 30 or sacrifice child

Killed process 14658 (apache2) total-vm:72200kB, anon-rss:10244kB, file-rss:0kB


You'll need to identify the culprit and adjust its configuration to prevent it from happening again.

6 Replies

Are you running anything PHP-related? If so, are you using mod_php? If so, what did you set MaxClients for mpm-prefork to? If you didn't touch it, your configuration is assuming you have somewhere in the range of 8 to 16 GB of RAM.

Try MaxClients 20 and see how that goes. (You may have to set KeepaliveTimeout to 1, depending on your traffic levels.)

There seems to be a rash of these "OOM/help my new Linode fell over and can't get up" reports lately and almost always from people making their first post. Is it coincidence or something else?

The more time goes on, the bigger Linode gets, and the more beginners there are to need help.

@jebblue:

There seems to be a rash of these "OOM/help my new Linode fell over and can't get up" reports lately and almost always from people making their first post. Is it coincidence or something else?

@Guspaz:

The more time goes on, the bigger Linode gets, and the more beginners there are to need help.

I'd go with the reasoning as to why I switched to Linode: tired of using a large shared hosting company. Unfortunately, as the topic suggests, you need to apparently have some know-how which me as well as most likely many others don't necessarily have.

@hoopycat:

Are you running anything PHP-related? If so, are you using mod_php? If so, what did you set MaxClients for mpm-prefork to? If you didn't touch it, your configuration is assuming you have somewhere in the range of 8 to 16 GB of RAM.

Try MaxClients 20 and see how that goes. (You may have to set KeepaliveTimeout to 1, depending on your traffic levels.)

Appreciate the advice. I'll look to change the settings and see how it goes.

@christianamplify:

Unfortunately, as the topic suggests, you need to apparently have some know-how which me as well as most likely many others don't necessarily have.
So did you ignore the UNMANAGED VPS service part, or just didn't know what that means?

If the latter, then Linode (as their market expands) needs to work harder at describing exactly what a un-managed VPS service provides.

I have had this issue before.

This is almost certainly due to some bad code somewhere in your site or one of your sites.

Your mysqld & apache are most likely consuming all the memory and cpu as a result of the bad code.

Try getting on the console and kill apache and mysql processes, fix or disable offending code and restart apache and mysql.

We had this issue with a site bringing down a server, it was caused by a Wordpress theme!

hope this helps.

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