<div dir="ltr">Even later reply. To chime in on Danills comment. It is a linux specific problem that the kernel OOM killer will go ahead and kill the whole process tree meaning Erlang and Heart at the same time because heart is a child process of erl.<div><br></div><div>For this reason I would strongly advise against using heart on linux based systems at this time. One option is using supervisord which is very easy to configure and use with erlang - and does not have the above problem.</div><div><br></div><div>Here is a complete sample configuration with '...' as placeholders for your deployment:</div><div><br></div><div>/etc/supervisord/conf.d/erl.conf:</div><div>[program:erl]<br></div><div><div><div>autorestart=true<br></div><div>command=/usr/bin/erl -noinput -noshell +K true -boot ... -config ... <br></div><div>directory=...</div></div><div><div>environment=HOME=...<br></div></div><div><div>redirect_stderr=true</div></div><div>user=...<br></div><div><br></div></div><div><br></div><div>Best</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 24, 2015 at 4:33 AM, Matthias Lang <span dir="ltr"><<a href="mailto:matthias@corelatus.se" target="_blank">matthias@corelatus.se</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 13. May 2015, Michael L Martin wrote:<br>
<br>
> But who watches the watchdog?<br>
<br>
</span>Late reply. One approach is to have a hardware watchdog.<br>
<br>
On the embedded system I work on, Erlang kicks a custom 'heart'<br>
program.  The heart program kicks the hardware watchdog.<br>
<br>
Hangs in Erlang code are dealt with by timeouts and supervisors.<br>
Hangs in the VM are dealt with by 'heart'.<br>
Hangs in 'heart' are dealt with by the hardware watchdog.<br>
<br>
This approach is sufficient to make hangs an insignificant contributor<br>
to downtime in a five-nines environment (signalling in the SS7<br>
network), in my experience.<br>
<br>
Matt<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" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Dominic Letz<div>Director of R&D<br><div><a href="http://exosite.com" target="_blank">Exosite</a></div><div><br></div></div></div></div>
</div>