ejabberd + LDAP eat memory

I have ejabberd running with LDAP as auth+vCard backend
After user takes some actions like Service Discovery, ejabberd crashed in a few seconds. watchdog send one msg like this

(ejabberd@jabber) The process <0.1865.0> is consuming too much memory: [{old_heap_block_size,832040},{heap_block_size,514229},{mbuf_size,0},{stack_size,1119},{old_heap_size,319812},{heap_size,193298}].
Process type: c2s
Command to kill this process: kill ejabberd@jabber <0.1865.0>

and many (50-100) like this

(ejabberd@jabber) The process <0.156.0> is consuming too much memory: [{old_heap_block_size,0},{heap_block_size,12538050},{mbuf_size,0},{stack_size,77},{old_heap_size,0},{heap_size,3219129}].
[{current_function,{lists,split_1_1,6}},
{initial_call,{proc_lib,init_p,5}},
{message_queue_len,0},
{links,[<0.53.0>,<0.54.0>,#Port<0.303>]},
{dictionary,[{1336,3384},
              {'$ancestors',[dets_sup,kernel_safe_sup,kernel_sup,<0.8.0>]},
              {312,1336},
              {'$initial_call',{dets,init,[<0.53.0>,<0.54.0>]}}]},
{heap_size,12538050},
{stack_size,80}]

or "crash via web admin":

(ejabberd@jabber) The process <0.162.0> is consuming too much memory: [{old_heap_block_size,0},{heap_block_size,5135590},{mbuf_size,0},{stack_size,77},{old_heap_size,0},{heap_size,1681214}].
[{current_function,{dets_v9,binobjs2terms,6}},
{initial_call,{proc_lib,init_p,5}},
{message_queue_len,1},
{links,[<0.53.0>,<0.54.0>,#Port<0.312>]},
{dictionary,[{1336,3384},
              {'$ancestors',[dets_sup,kernel_safe_sup,kernel_sup,<0.8.0>]},
              {312,1336},
              {'$initial_call',{dets,init,[<0.53.0>,<0.54.0>]}}]},
{heap_size,5135590},
{stack_size,69}]

no crush.dumps

logs - silent

in LDAP ~9000 users, but connected 10-15.
if ejabberd connected to test DB with 15 users - all clear
in Virtual Hosts i see 497 usrs, 12-15 connected. where my 9k users ?

system - ia32 Gentoo, OpenVZ kernel, ejabberd 2.0.2

ideas?

evadim wrote: no

evadim wrote:

no crush.dumps

If ejabberd crashed completely, then some erl_crash.dump should be generated in the logs directory.

evadim wrote:

in LDAP ~9000 users, but connected 10-15.
in Virtual Hosts i see 497 usrs, 12-15 connected. where my 9k users ?

Maybe only ~500 are returned by the LDAP server? Or maybe LDAP returns 9000, but ejabberd crashes when counting them, and only 500 are counted?

evadim wrote:

in LDAP ~9000 users, but connected 10-15.
if ejabberd connected to test DB with 15 users - all clear

Then the problem may be related to the 9000 accounts registered in LDAP.

Did you set the option ldap_filter? Maybe you prefer to try the option ldap_local_filter instead. Check the ejabberd Guide, also available here:
http://svn.process-one.net/ejabberd/tags/ejabberd-2.0.2/doc/guide.html#l...

Syndicate content