[erlang-questions] Investigate an infinite loop on production servers

Matthias Lang matthias@REDACTED
Tue May 28 01:01:29 CEST 2013


Quoting myself:

> Here's how we limit Erlang's memory use (on linux):

[C code cut, only really makes sense if you're starting Erlang from
some sort of heartbeat system]

If you just want to see this work from bash (again, on linux, but
probably works on many *nixes):

  > erl
  Erlang R15B03 (erts-5.9.3.1) [source] [64-bit] [smp:2:2] [async-threads:0] [hipe] [kernel-poll:false]
  1> lists:seq(1, 123456789).
%% at this point, pressing ^C or ^G doesn't work for me, but 'kill' does.

  >ulimit -v 1000000
  ~ >erl
  Erlang R15B03 (erts-5.9.3.1) [source] [64-bit] [smp:2:2] [async-threads:0] [hipe] [kernel-poll:false]
  1> lists:seq(1, 123456789).
  %% a few seconds pass
  Crash dump was written to: erl_crash.dump
  eheap_alloc: Cannot allocate 306104640 bytes of memory (of type "heap").
  Aborted

Matt



More information about the erlang-questions mailing list