How Disabling OOM killer on Ubuntu

Sometimes it may be necessary to disable OOM killer due to problems with it. In this case, just put the following code in /etc/sysctl.conf

vm.overcommit_memory = 2
vm.overcommit_kbytes = 0


We recommend that servers with low RAM (less than 4 GB) do not disable this function at all, as your server may have major problems.