[erlang-questions] beam is crashed due to out of memory & it is not started automatically after that even used heart

Magnus Henoch magnus@REDACTED
Wed Jun 28 12:57:46 CEST 2017

Sanath Prasanna <ahe.sanath@REDACTED> writes:

> Hi all, My system is going down due to out of memory & it is not 
> auto started even set -heart command in starting. What is the 
> reason for this ? Can someone explain how to overcome this 
> problem. (not starting system automatically using heart) Br, 
> Robert 
> /var/log/message 
> aa_hub kernel: [60952995.574233] Out of memory: Kill process 
> 2480 (beam.smp) score 498 or sacrifice child Jun 27 13:31:07 
> aa_hub kernel: [60952995.577670] Killed process 2565 (heart) 
> total-vm:8408kB, anon-rss:92kB, file-rss:0kB Jun 27 13:31:07 
> aa_hub kernel: [60952995.584754] epmd invoked oom-killer: 
> gfp_mask=0x201da, order=0, oom_score_adj=0 Jun 27 13:31:07 
> aa_hub kernel: [60952995.587996] epmd cpuset=/ mems_allowed=0 
> startup command 
> /system/bin/run_erl -daemon /system/test/pipe/ /tmp 
> "/system/bin/start_erl /system /system /system/bin/start_erl 
> -smp auto* -heart -*sname test +64 +P10000 +B i -setcookie test" 

I've seen the same issue.  The problem is that the OOM killer 
identifies a process to kill, and then kills all its child 
processes before killing the chosen process itself.  Since heart 
is a child process of the beam process, it doesn't have a chance 
to restart the Erlang VM.

I tried to fix it with the patch below, but it didn't work for 
some reason - I don't remember the details.  I ended up solving 
the problem by addressing the memory usage itself.



More information about the erlang-questions mailing list