[ejabberd] memory profiling

Lee Azzarello lee at dropio.com
Sat Mar 21 00:51:42 MSK 2009

Thanks for the advice. Looking at the top of the crash dump, I noticed
it confirms memory exhaustion:

Thu Mar 19 16:39:49 2009
Slogan: eheap_alloc: Cannot allocate 1271244 bytes of memory (of type "heap").
System version: Erlang (BEAM) emulator version 5.6.3 [source]
[async-threads:0] [kernel-poll:true]
Compiled: Sun Jul 20 04:41:21 2008
Atoms: 12892
total: 2537660375
processes: 2415201072
processes_used: 2415181200
system: 122459303
atom: 600737
atom_used: 573897
binary: 51605021
code: 5503079
ets: 53549560

2 billion processes seems a bit high. The server maintains about 1.4K
connected anonymous users with associated http_bind connections, and
around 40K online MUC rooms.

I'll do more digging tomorrow.


On Fri, Mar 20, 2009 at 5:30 PM, Christopher Zorn
<christopher.zorn at gmail.com> wrote:
> On Fri, Mar 20, 2009 at 5:23 PM, Lee Azzarello <lee at dropio.com> wrote:
>> I'm running ejabberd SVN revision 1978. My application is focused on
>> http_bind and mod_muc. A very large number of persistant rooms is
>> created and a script cleans them out using mod_muc_admin functions.
>> Unfortunately, RAM isn't getting freed and ejabberd has been crashing
>> reliably every three days. I'm looking for some advice on how to get
>> more detailed information out of ejabberd so I can target the problem.
>> RAM is the only resource that's scarce, load and CPU are almost
>> invisible.
> You can try the eper tools. http://code.google.com/p/eper/
> But you can get some information about of the crash dump too. It will tell
> you why it crashed and you can find out where by looking at the heap or the
> best place usually is to look for "Message queue length:" in the process
> information of the dump.
> The dump is called erl_crash.dump and most of the time located in the
> ejabberd log directory.
> The erlang docs for crash dumps help too.
> http://www.erlang.org/doc/apps/erts/crash_dump.html
> I hope this helps. It is at least a place to start.
>> -lee
>> _______________________________________________
>> ejabberd mailing list
>> ejabberd at jabber.ru
>> http://lists.jabber.ru/mailman/listinfo/ejabberd
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd

More information about the ejabberd mailing list