[erlang-questions] Fail fast
Wed Dec 21 12:13:16 CET 2011
On 2011-12-21 03:23, Chandru wrote:
> Hello everyone,
> I've just had a failure in one of my live services because an erlang
> node ran out of memory (caused by a traffic spike). Restart mechanisms
> exist to restart the node, but the node took a long time to die because
> it was writing a large erl_crash.dump file, and then there was a 7GB
> core dump.
> Is there a quicker way to fail? I'm thinking of disabling core dumps
> entirely on the box. What else can I do? A configuration option on the
> node to only produce a summary erl_crash.dump would be nice. The most
> useful things for me in a crash dump usually are the slogan at the top,
> and the message queue lengths of each process. In this particular case,
> the slogan would've told me all that I needed to know.
Apart from limiting the size of core dumps in the OS, you can set the
ERL_CRASH_DUMP* environment variables described at the bottom of the
manual page for erl (http://www.erlang.org/doc/man/erl.html) to get some
control over the Erlang crash dumps.
More information about the erlang-questions