To disable OOM, follow the below steps.
Check status of oom-killer:
# cat /proc/sys/vm/oom-kill
Turn oom-killer off/on:
# echo "0" > /proc/sys/vm/oom-kill
# echo "1" > /proc/sys/vm/oom-kill
To make this change take effect at boot time, add the following
vm.oom-kill = 0
For processes that would have been killed, but weren't because the oom-
killer is disabled, you'll see the following message
"Would have oom-killed but /proc/sys/vm/oom-kill is disabled"