[erlang-questions] eheap cannot allocate for which process?

Szoboszlay Dániel <>
Mon Mar 17 14:00:40 CET 2014


Hi,

I'd say it's the garbing process. The garbage collector is copying, so it  
first allocates a big chunk of memory then copies the non-garbage data  
there from the old heap. So it's always a likely suspect.

All other processes in the below table are waiting. So they are not  
running, thus not allocating memory either. Which means it's either the  
garbing process or one of the 31 scheduled, but since they don't use too  
much memory they are not likely to cause trouble.

Regards,
Daniel

On Mon, 17 Mar 2014 09:51:13 +0100, József Bérces  
<> wrote:

>
> I receive the classic “eheap_alloc: Cannot allocate…” message. It wants  
> to allocate ~1GB memory and that fails. That is fine, I am doing  
> something wrong. So I >took the crash dump and tried to find out which  
> one of my processes is the guilty one.
>
> Unfortunately, I cannot tell it from the crash dump.
>
> The memory section says:
>
> =memory
>
> total: 15447352528
>
> processes: 15140232809
>
> processes_used: 15140005610
>
> system: 307119719
>
> atom: 512601
>
> atom_used: 496586
>
> binary: 148574400
>
> code: 21228007
>
> ets: 119988984
>
>
> I have 16GB RAM, so the processes use almost all. There are 4010  
> processes. 1 garbing, 31 scheduled, 3978 waiting. If I sum stack+heap of  
> all the processes >then I get ~700MB. That is very far from 16GB. Here  
> are the top 10 stack+heap processes:
>> Pid 	
>> State	
>> Reductions	
>> Stack+heap	
>> MsgQ Length

>> <0.21060.67>	
>> Garbing >(limited >info)	
>> 1,508,838,180	
>> 145,962,050	
>> 1

>> <0.25689.27>	
>> Waiting	
>> 86,670,344	
>> 145,962,050	
>> 0

>> <0.10003.68>	
>> Waiting	
>> 1,363,039	
>> 38,263,080	
>> 0

>> <0.15943.66>	
>> Waiting	
>> 1,882,465,380	
>> 30,610,465	
>> 0

>> <0.15879.68>	
>> Waiting	
>> 471,549	
>> 30,610,465	
>> 0

>> <0.31854.67>	
>> Waiting	
>> 154,500,777	
>> 24,488,375	
>> 0

>> <0.16221.68>	
>> Waiting	
>> 262,114	
>> 24,488,375	
>> 0

>> <0.16628.68>	
>> Waiting	
>> 117,268	
>> 24,488,375	
>> 0

>> <0.15878.68>	
>> Waiting	
>> 453,490	
>> 19,590,700	
>> 0

>> <0.16235.68>	
>> Waiting	
>> 181,968	
>> 19,590,700	
>> 0

>
>
> Any ideas how to tell which process needs ~1GB memory?
>
>
> Thanks,
>
> Jozsef
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140317/f9029a9f/attachment.html>


More information about the erlang-questions mailing list