[erlang-questions] very long init:stop() and +P emulator flag

Vyacheslav Levytskyy <>
Mon Sep 25 21:02:52 CEST 2017


Hi,

I've experienced very long duration of Erlang node shutdown after 
init:stop() : about 8 minutes. At last I've found a solution -- when I 
remove emulator flag for the maximum number of simultaneously existing 
processes (+P 134217727) the shutdown of the node return to normal 
couple of seconds.

I'm using Erlang/OTP 20.0 on Ubuntu LTS 16.04, node runs in embedded 
mode. The problem with long shutdown happens after all applications have 
already gone, and just 30-40 processes and about 10 ports of kernel 
remains running. Actually it happens even after a clean boot with just 
kernel and stdlib applications started. Option -shutdown_time does not 
help. The only solution that works for me at the moment is to remove +P 
134217727 -- maybe decreasing the number of simultaneously existing 
processes helps as well (it should), but I did not check that and did 
not search after which value of +P the problem would disappear.

I'm quite puzzled with relations between +P and really long init:stop(), 
and would like to ask if somebody can explain that?

Vyacheslav


.


More information about the erlang-questions mailing list