<div dir="ltr">As Craig said, there is a limit of 255 characters in an atom<br><br><a href="http://erlang.org/doc/efficiency_guide/advanced.html">http://erlang.org/doc/efficiency_guide/advanced.html</a><br><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div><br></div>--<div>Santiago</div></div></div>
<br><div class="gmail_quote">On Sun, May 8, 2016 at 1:57 AM, zxq9 <span dir="ltr"><<a href="mailto:zxq9@zxq9.com" target="_blank">zxq9@zxq9.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2016年5月8日 日曜日 12:33:03 Khitai Pang wrote:<br>
> When I restart my app I get "escript: exception error: a system limit<br>
> has been reached".  I can't figure out the reason.<br>
><br>
><br>
> $ myapp/_rel/myapp/bin/myapp restart<br>
<br>
</span>Whatever is happening there is trying to call list_to_atom/1 with a HUUUUUGE string (why is that even happening?). That entire blob of text starting with "myapp_maint_5500@..." is ONE huge string you are passing to list_to_atom/1. That is beyond the limit for atom sizes, so you get this error:<br>
<br>
I couldn't find it in the docs anywhere, but the max size of an atom is 256 characters:<br>
<br>
<br>
ceverett@changa:~$ erl<br>
Erlang/OTP 18 [erts-7.2] [source] [64-bit] [smp:2:2] [async-threads:10] [kernel-poll:false]<br>
<br>
Eshell V7.2  (abort with ^G)<br>
1> list_to_atom("zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz").<br>
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz<br>
2> list_to_atom("zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz").<br>
** exception error: a system limit has been reached<br>
     in function  list_to_atom/1<br>
        called as list_to_atom("zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz")<br>
<br>
<br>
My suspicion is that your "restart" function is accepting as input some output of the last run of the script and expecting to receive its node name as a string (probably "myapp_maint_5500@...") but instead you are actually getting a huge string with a node name plus a crash report, and trying to restart it with a node name that is the entire previous crash report.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br></div>