ejabberd - Comments for "Erlang crashes - unable to allocate memory" https://www.ejabberd.im/node/4124 en Yeah, I thought it was odd https://www.ejabberd.im/node/4124#comment-56095 <p>Yeah, I thought it was odd that it was using so much RAM for such a few users.</p> <p>The roster is about 14Mb (DCD) and about 3Mb (DCL).</p> <p>Although there aren't a large number of users, we are using http-bind rather than a stand alone client, and are performing several REST calls using mod_rest to manipulate the roster, get online user count to generate graphs for rrdtool etc. </p> <p>I was unable to inspect the crash dump using the webtool because the ejabberd server is behind a firewall and doesn't have port 8888 open.</p> Thu, 24 Jun 2010 13:22:29 +0000 qu1cksand comment 56095 at https://www.ejabberd.im Re: Erlang crashes - unable to allocate memory https://www.ejabberd.im/node/4124#comment-56091 <p>You can put your crash dump somewhere so we can investigate it.</p> Thu, 24 Jun 2010 11:20:02 +0000 zinid comment 56091 at https://www.ejabberd.im qu1cksand https://www.ejabberd.im/node/4124#comment-56089 <div class="quote-msg"> <div class="quote-author"><em>qu1cksand</em> wrote:</div> <p>=erl_crash_dump:0.1<br /> Sun Jun 20 23:08:43 2010<br /> Slogan: eheap_alloc: Cannot allocate 467078560 bytes of memory (of type "old_heap").<br /> System version: Erlang (BEAM) emulator version 5.6.5 [source] [smp:4] [async-threads:0] [hipe] [kernel-poll:true]</p> <p>On average there are only approximately 30 people connected to the ejabberd server at any given time. </p></div> <p>30 typical Jabber chat users, how can that push ejabberd to require 450 MB of RAM?</p> <p>In my open server (which may receive attacks, missusers, buggy clients) consumes for 420 concurrent users around 750 MB of RAM. We don't have local transports (no PyICQt, no Spectrum...).</p> <p>Check if there are error messages in your ejabberd log files. Check if there is any internal table with anormal large size (roster, offline_msg, vcard). In the crash dump, inspect it with "erl -s webtool", maybe you find that some process consumes a lot of memory in its message queue.</p> <div class="quote-msg"> <div class="quote-author"><em>qu1cksand</em> wrote:</div> <p>Is there any way that you can somehow specify a fixed amount of memory to allocate to erlang or is there perhaps another solution to this problem? </p></div> <p>I am not aware of any such option. The erlang VM just tries to use as many memory as it needs and is available in the system.</p> Thu, 24 Jun 2010 10:57:22 +0000 mfoss comment 56089 at https://www.ejabberd.im