[erlang-questions] centos 6.5 OOM kills heart process making restart impossible

Michael Santos michael.santos@REDACTED
Mon Oct 20 13:52:33 CEST 2014

On Mon, Oct 20, 2014 at 03:19:30PM +0400, Anton Lebedevich wrote:
> Hello.
> When erlang process (erlang-17.3-2.el6 from Erlang Solutions packages)
> eats too much memory under CentOS 6.5 it is killed by OOM killer which
> is expected.
> But when I run it with -heart the heartbeat process gets killed first
> because it's a child of beam.smp which has the largest OOM score. It
> makes erlang application stop forever because both beam.smp and heart
> are dead.
> I don't remember similar problems under R14-16 and Debian.
> Is there any way to make sure that beam.smp is killed first to allow
> heat process to restart it?

Disable the OOM killer. Add to /etc/sysctl.conf:

The OOM killer can also be disabled per process. For example, if the
PID of heart is 12345:

    sudo echo -1000 > /proc/12345/oom_adj_score

    cat /proc/12345/oom_adj_score

See proc(5) for details.

More information about the erlang-questions mailing list