User Tools

Site Tools


oom

Oom

= OOM - Out of Memory =

Am oom refers to both RAM and SWAP all been used up. It pretty much cripples the server. By default an oom_killer kicks in and should kill the offending process. However with a lamp stack (MySQL and Apache) oom_killer does not do a good job (in my opinion).

99% of the time, I had to do a hard reboot on the server as the console was not responding.

If an OOM does not happen often, you can simply tell the server to reboot on oom.

Reboot Server on OOM

vi /etc/sysctl.conf #Add the following vm.panic_on_oom=1 kernel.panic=10 #60 = wait 60 seconds before rebooting.

To put it into immediate effect

echo 1 > /proc/sys/vm/panic_on_oom echo 60 > /proc/sys/kernel/panic

References

oom.txt · Last modified: 2022/07/19 21:13 by 127.0.0.1