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

Tristan Sloughter t@REDACTED
Mon Sep 25 23:23:03 CEST 2017


I checked and running erl with that +P 134217727 results in a beam
process using 1.517g of memory. So cleaning that up is probably what is
taking so much time on shutdown :)

134217727 certainly seems excessive... What size system would even be
able to handle dealing with that many processes?

-- 
  Tristan Sloughter
  "I am not a crackpot" - Abe Simpson
  t@REDACTED

On Mon, Sep 25, 2017, at 12:02 PM, Vyacheslav Levytskyy wrote:
> 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
> 
> 
> .
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list