= 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.
vi /etc/sysctl.conf #Add the following vm.panic_on_oom=1 kernel.panic=10 #60 = wait 60 seconds before rebooting.
echo 1 > /proc/sys/vm/panic_on_oom echo 60 > /proc/sys/kernel/panic