[erlang-questions] Memory management

Ladislav Lenart lenartlad@REDACTED
Thu Apr 26 18:30:51 CEST 2007

James Hague wrote:
> Two possibilities come to mind.
> The first is that a process is getting flooded with messages that it
> isn't handling, so they sit in the mailbox until the process gets
> killed.  Almost every time I've seen memory usage spike, it's because
> of mailbox size.
This should not be our case because we use standard behaviors for all
our processes (mostly gen_servers). A gen_server reads any incoming
request from the mailbox and passes it to handle_xxx CB function which
ends with handle_xxx(_, State) -> {noreply, State}.

> The other possibility is that you've got a process which creates large
> binaries over a short period of time.  Binaries are outside the
> process heap, so it's possible to rapidly fill up memory  with
> binaries before GC kicks in.
We do not use binaries at all in our app.

Ladislav Lenart

More information about the erlang-questions mailing list