Ejabberd problem - contact list lost when many users are connected

Hello, everyone!

We have a problem with the ejaberd application on our NethServer.
We are using NethServer 7.9.2009 and ejaberd xmpp 1.8.4 in NethServer.
We have 250 user accounts in NethServer. When any user connects to the NethServer from xmpp client like gajim, miranda, Thunderbird he will see the list of contacts. But when the number of users increases, new users lose their contact list.
We see next error in ejaberd log:

2023-06-09 13:11:18.487 [error] <0.582.0>@eldap_pool:do_request:76 LDAP request failed: eldap:search([[{base,<<"dc=directory,dc=nh">>},{filter,{equalityMatch,{'AttributeValueAssertion',<<"objectClass">>,<<"posixAccount">>}}},{timeout,5},{deref_aliases,never},{attributes,[<<"cn">>]}]])
Reason: {killed,{p1_fsm,sync_send_event,[<0.485.0>,{search,{eldap_search,wholeSubtree,<<"dc=directory,dc=nh">>,{equalityMatch,{'AttributeValueAssertion',<<"objectClass">>,<<"posixAccount">>}},0,[<<"cn">>],false,neverDerefAliases,5}},110500]}}
2023-06-09 13:11:18.488 [error] <0.595.0>@eldap_pool:do_request:76 LDAP request failed: eldap:search([[{base,<<"dc=directory,dc=nh">>},{filter,{equalityMatch,{'AttributeValueAssertion',<<"objectClass">>,<<"posixAccount">>}}},{timeout,5},{deref_aliases,never},{attributes,[<<"cn">>]}]])
Reason: {killed,{p1_fsm,sync_send_event,[<0.485.0>,{search,{eldap_search,wholeSubtree,<<"dc=directory,dc=nh">>,{equalityMatch,{'AttributeValueAssertion',<<"objectClass">>,<<"posixAccount">>}},0,[<<"cn">>],false,neverDerefAliases,5}},110500]}}
2023-06-09 13:11:18.488 [error] <0.598.0>@eldap_pool:do_request:76 LDAP request failed: eldap:search([[{base,<<"dc=directory,dc=nh">>},{filter,{equalityMatch,{'AttributeValueAssertion',<<"objectClass">>,<<"posixAccount">>}}},{timeout,5},{deref_aliases,never},{attributes,[<<"cn">>]}]])
Reason: {killed,{p1_fsm,sync_send_event,[<0.485.0>,{search,{eldap_search,wholeSubtree,<<"dc=directory,dc=nh">>,{equalityMatch,{'AttributeValueAssertion',<<"objectClass">>,<<"posixAccount">>}},0,[<<"cn">>],false,neverDerefAliases,5}},110500]}}
2023-06-09 13:11:18.488 [error] <0.586.0>@eldap_pool:do_request:76 LDAP request failed: eldap:search([[{base,<<"dc=directory,dc=nh">>},{filter,{equalityMatch,{'AttributeValueAssertion',<<"objectClass">>,<<"posixAccount">>}}},{timeout,5},{deref_aliases,never},{attributes,[<<"cn">>]}]])
Reason: {killed,{p1_fsm,sync_send_event,[<0.485.0>,{search,{eldap_search,wholeSubtree,<<"dc=directory,dc=nh">>,{equalityMatch,{'AttributeValueAssertion',<<"objectClass">>,<<"posixAccount">>}},0,[<<"cn">>],false,neverDerefAliases,5}},110500]}}
2023-06-09 13:11:18.630 [warning] <0.478.0> Shrinking cache 'roster_item_cache' (current size = 1020, max size = 1000, life time = 3600000, memory = 288384 bytes); you should increase maximum cache size if this message repeats too often
2023-06-09 13:11:19.933 [warning] <0.478.0> Shrinking cache 'roster_item_cache' (current size = 1006, max size = 1000, life time = 3600000, memory = 284592 bytes); you should increase maximum cache size if this message repeats too often
2023-06-09 13:11:19.934 [warning] <0.478.0> Shrinking cache 'roster_item_cache' (current size = 1001, max size = 1000, life time = 3600000, memory = 283576 bytes); you should increase maximum cache size if this message repeats too often
2023-06-09 13:11:19.934 [warning] <0.478.0> Shrinking cache 'roster_item_cache' (current size = 1001, max size = 1000, life time = 3600000, memory = 282528 bytes); you should increase maximum cache size if this message repeats too often
2023-06-09 13:11:19.934 [warning] <0.478.0> Shrinking cache 'roster_item_cache' (current size = 1001, max size = 1000, life time = 3600000, memory = 282856 bytes); you should increase maximum cache size if this message repeats too often

Can anyone help solve this issue?

Hi and welcome!

I believe the answer is given in the log files. Increase the maximum cache size.

According to this:
https://docs.ejabberd.im/admin/configuration/toplevel/#cache-size

You should set it to 5000 based on the number of users you currently have?
I do not have the module installed so I do not if the size can be set by a command or if it requires a manual change in the ejabberd conif file. Maybe @stephdl has an idea.

HTH

1 Like