Getting regular "Out of memory: Kill process". How to resolve this isse?

July 30, 2013 13.9k views
Regularly I got the following message in syslog file: "Out of memory: Kill process 837 (mysqld) score 59 or sacrifice child". This is really annoying. I already created a swapfile using this tutorial "https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04" but I still get error. Could you please tell me how to fix this issue? My droplet is a $5 one with 512Mb RAM. THe distro is Ubuntu 13.04 x64. (the funny thing is that default mysql configuration worked perfectly on my previous server (VPS Gandi with only 256Mb RAM)
1 comment
  • I'm getting the same thing on $10 plan for apache2 (running wordpress and have basically zero traffic except for myself.

19 Answers
You can try tweaking /etc/mysql/my.cnf or resizing your droplet to a larger plan.
It might not necessarily be a MySQL problem. Sometimes, other programs hog a server's memory - leaving MySQL too little memory to work with.

Are you running Apache? If so, you should fine-tune Apache2 and MySQL memory usage.

Is it too late for you to copy the config from VPS Gandi, so you can compare it to the config on your droplet?

Guys, I have the same problem.
"You can try tweaking /etc/mysql/my.cnf"
"You should fine-tune Apache2 and MySQL memory usage"

  • is there any step by step explanation of these two?

Thank you!

Same problem here. on $20 per month plan and zero traffic, mysql (on wordpress) keeps stopping (out of memory).

I have the same issue... Really annoying.

I have the same issue... Really annoying. on $10 per month plan

I am facing same issue with $5 plan. My website is not working even. Can anyone from digital ocean helps us here.

I guess this has something to do with DO infra. My Server was running for 2 years with no prob and since last week it is having the same issue. I upgraded to $10 and things are the same

Been fine for the last one year, but got this same issue since last week, plan to upgrade, but it seems will cancel it if has the same issue with @revel .

Any further update?

Thank you.

Same issue...very annoying...can we get something to work [while I migrate everything to AWS]?

Same issue here...

If I use the terminal, I get this error:
"sshexchangeidentification: Connection closed by remote host"

If I try to use the Online Console, every command gets an error like:
"Out of Memory: Kill process ... or sacrifice child ... "

What should I do? My server is offline for 3 days and I can't get it working!
Any help?? Thanks!

Same problem. Have to do "shutdown -r now" several times per day as MySQL seems to get killed often. I considered upgrading to a larger plan but see others are having the same problem with larger plans. I'm surprised there's no solutions since the months this has been an issue.

Same Issue here!, new website on DO, worked for a month or so then started crashing every day, move it to a new droplets, was fine again for a week now the problem has returned.

Tried to upgrade to a better spec, did not make a difference.

This seem to be a common issue, no response from DO? time to move to another host?

Also getting this, wordpress on 10$,

I am also getting the same thing with the $10 Wordpress plan. Seriously considering moving to a different host.

same here, digging around for answers and I see there has been none given to this question yet...

Try to use a swap file.
Getting this error with a nodejs process et resolved since using a swap

by Justin Ellingwood
Swap space can be used as an "overflow" area for your system when you run out of RAM. The operating system can store data that would normally be kept in RAM on the hard drive in a specially formatted file. In this guide, we'll demonstrate how to create and use one of these files in Ubuntu 14.04.

I too have the same problem, Is there an answer from support team..? It was working fine till last couple of months. What is going on..?

It's a problem with the servers cgroup configuration.
Disabling cgroups would solve the problem.

Have another answer? Share your knowledge.