[erlang-questions] beam.smp is killed by oom

Gustav Simonsson gustav.simonsson@REDACTED
Tue Aug 7 11:14:53 CEST 2012

If you disable the Linux oom-killer and allow the BEAM to consume memory until it
crashes when a memory allocator cannot allocate more memory, you should get a 
Erlang dump [1] which will contain process information such as heap size and 
message queue size for your Erlang processes. You can then (hopefully) find
certain processes which had large message queues and/or had large heaps.

Another way, if you are doing load testing where you can control the number of
connections, is to gradually increase the number of connections while looking at
message queue length, heap size and other process properties using the observer app [2].

1. http://www.erlang.org/doc/apps/erts/crash_dump.html
2. http://www.erlang.org/doc/apps/observer/observer_ug.html

// Gustav

Sent from my PC

----- Original Message -----
> From: "ori brost" <oribrost@REDACTED>
> To: erlang-questions@REDACTED
> Sent: Sunday, 5 August, 2012 7:48:12 PM
> Subject: Re: [erlang-questions] beam.smp is killed by oom
> We suspect this may be because of os_mon (as it prints some messages
> before oom-killer kills beam.smp)
> On Sun, Aug 5, 2012 at 8:40 PM, ori brost < oribrost@REDACTED >
> wrote:
> We are load testing a server we implemented in Erlang. Memory usage
> for beam.smp stays doesn't go above 30% memory until we get to
> roughly 93000 connections. During what appears to be roughly 5
> seconds, beam.smp is killed by Linux's oom-killer (I'm assuming that
> during these 5 seconds, mem usage spikes up). Any idea how we can
> trace this problem?
> Some traces from our system:
> This is what beam.smp prints shortly before it is oom-killed:
> http://pastebin.com/s4sJqXwY
> This is dmesg output:
> http://pastebin.com/wFUw84yj
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list