[erlang-questions] Memory management

Mazen Harake <>
Thu Apr 26 18:46:54 CEST 2007


Are the incoming calls casts or calls? (or both?)

Maybe a stupid thing to ask but from your example you are using the
cast/info callbacks.. maybe you're not catching all the calls? or maybe
replying {noreply, State} to them as well :)



Ladislav Lenart wrote:
> 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
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>   


-- 
Mazen Harake <>
Erlang Software Developer and Consultant,
Erlang Training & Consulting, Ltd

Mobile Phone: +44 (0)795 13 26 317
Office Phone: +44 (0)207 45 61 020
Office Address:
401 London Fruit & Wool Exchange
Brushfield St, London, E1 6EL
United Kingdom

This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of "Erlang Training & Consulting, Ltd".

If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone. Please contact the sender if you believe you have received this email in error.




More information about the erlang-questions mailing list