[erlang-questions] erlang woes

Geoff Cant <>
Fri Aug 6 00:45:04 CEST 2010


Arun Suresh <> writes:

> On Thu, Aug 5, 2010 at 12:57 PM, Scott Lystig Fritchie <
> > wrote:
>
>> Arun Suresh <> wrote:
>>
>> as> It does NOT tell me which process had made the request for the
>> as> memory..  which could not be allocated.. and which brought the node
>> as> down !!

In a system like erlang, the particular thing that tries an allocation
that crashes the system is more often than not _unlikely_ to be the real
culprit.

Examples scenarios include:

A) The allocator need not be a process. ETS tables, drivers, and a host
of other thing allocate memory, and these are not all tied to specific
processes.

B) If process A allocates 11Gb (all remaining memory) and then process B
asks for 2 bytes, and the system crashes because this allocation can't be
honoured - process B is not the real culprit.


The crashdumps that you have almost certainly contain enough information
for you to diagnose the problem. Load them up in crashdump viewer and
browse around. Maybe there's a process with a huge heap - then either
this process is broken, or maybe it runs too slowly (if it's the message
queue for the process that's consuming all the heap space). If its
message queue is consuming the memory, then maybe it's a downstream
process not keeping up and this process is just buffering for the rest
of the system. Maybe it's not a process at all - it could be an ETS
table or two that are not being cleaned out in a timely way. The
crashdump viewer lets you investigate all of this easily. I wouldn't try
to examine them by hand.

Cheers,
-- 
Geoff Cant


More information about the erlang-questions mailing list