<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><font face="Courier" class="">Hi,</font><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">I see the memory consumption of an erlang node grows exponentially and quickly when I was sending binary data of about 700 MB from shell to a simple erlang listener process and the shell process is stuck.</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class=""><div class="">-module(strange).</div><div class="">-export([start/0, listener/0, send/1, stop/0]).</div><div class=""><br class=""></div><div class="">start() -></div><div class=""> register(?MODULE, spawn(?MODULE, listener, [])).</div><div class=""><br class=""></div><div class="">listener() -></div><div class=""> receive</div><div class=""> {send, Data} -></div><div class=""> io:format("Received Data ~p ~n", [Data]),</div><div class=""> listener();</div><div class=""> stop -></div><div class=""> io:format("Stopping listener ~n")</div><div class=""> end.</div><div class=""><br class=""></div><div class="">send(Data) -></div><div class=""> ?MODULE ! {send, Data}.</div><div class=""><br class=""></div><div class="">stop() -></div><div class=""> ?MODULE ! stop.</div><div class=""><br class=""></div><div class="">$ uname -a</div><div class="">Darwin Chaitanyas-MacBook-Pro.local 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64</div></font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><div class=""><font face="Courier" class="">$ erl</font></div><div class=""><font face="Courier" class="">Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">Eshell V9.3 (abort with ^G)</font></div><div class=""><font face="Courier" class="">1> c(strange).</font></div><div class=""><font face="Courier" class="">{ok,strange}</font></div><div class=""><font face="Courier" class="">2> {ok, Data} = file:read_file("centos.iso").</font></div><div class=""><font face="Courier" class="">{ok,<<51,237,144,144,144,144,144,144,144,144,144,144,144,</font></div><div class=""><font face="Courier" class=""> 144,144,144,144,144,144,144,144,144,144,144,144,</font></div><div class=""><font face="Courier" class=""> 144,144,...>>}</font></div><div class=""><span style="font-family: Courier;" class="">3> strange:start().</span></div><div class=""><font face="Courier" class="">true</font></div><div class=""><font face="Courier" class="">4> strange:send(Data).</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded</font></div><div class=""><font face="Courier" class=""> (v)ersion (k)ill (D)b-tables (d)istribution</font></div></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">The observer says -</font></div><div class=""><font face="Courier" class=""><0.53.0><span class="Apple-tab-span" style="white-space:pre"> </span>group:server/3<span class="Apple-tab-span" style="white-space:pre"> </span>93980000<span class="Apple-tab-span" style="white-space:pre"> </span>17957208520<span class="Apple-tab-span" style="white-space:pre"> </span>1<span class="Apple-tab-span" style="white-space:pre"> </span>erlang:integer_to_list/1</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">The Mac activity monitor shows Erlang consuming 18GB of RAM.</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">Kindly, help me understand what is happening.</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">/Chaitanya</font></div></body></html>