Determine Vm Size of Process Killed by Oom-Killer

Finding which process was killed by Linux OOM killer

Try this out:

grep -i 'killed process' /var/log/messages

Out of memory: kill process

It's happening because your server is running out of memory. To solve this problem you have 2 options.

  1. Update your Server's Ram or use SWAP (But upgrading Physical ram is recommended instead of using SWAP)

  2. Limit Nginx ram use.

To limit nginx ram use open the /etc/nginx/nginx.conf file and add client_max_body_size <your_value_here> under the http configuration block. For example:

worker_processes 1;
http {
client_max_body_size 10M;
...
}

Note: use M for MB, G for GB and T for TB

Why my process has been killed?

You are victim of the Linux OOM Killer.

You can tune the way that the OOM killer handles OOM conditions with certain processes. for example, your my_proj process 3915 that was killed earlier.
If you want it not to be killed by the OOM killer, you can :

echo -15 > /proc/3915/oom_adj



Related Topics



Leave a reply



Submit