ejabberd - Comments for "history_size muc"
https://www.ejabberd.im/node/4877
enthanks for you reply badlop
https://www.ejabberd.im/node/4877#comment-57720
<p>thanks for you reply badlop :D</p>
<p>think i'll take solution A first :D<br />
if i find time and a way for better history handling i'll let you know :D</p>
<p>have a nice week!</p>
Wed, 10 Aug 2011 11:27:19 +0000vince123comment 57720 at https://www.ejabberd.imOk, so the problem appears
https://www.ejabberd.im/node/4877#comment-57712
<p>Ok, so the problem appears when:<br />
1. the room has many history messages<br />
2. a user joins the room<br />
3. the new occupant accepts to receive all the history<br />
4. the muc starts sending the messages, but in the meantime the client is siconnected, the CPU rises and auth fails.</p>
<p>Apparently, the current implementation of MUC history recovery isn't capable of handling big history.</p>
<p>Some solutions:</p>
<p>A) Don't configure the room to store so many messages :P</p>
<p>B) Change the client, to tell the room to not send him all the history, only a few messages<br />
<noindex><a href="http://xmpp.org/extensions/xep-0045.html#enter-managehistory" title="http://xmpp.org/extensions/xep-0045.html#enter-managehistory" rel="nofollow" >http://xmpp.org/extensions/xep-0045.html#enter-managehistory</a></noindex></p>
<p>C) Investigate what exact part of mod_muc is problematic, and try to find an alternative implementation.</p>
Tue, 09 Aug 2011 21:26:01 +0000mfosscomment 57712 at https://www.ejabberd.imhi again ;D
tried to localize
https://www.ejabberd.im/node/4877#comment-57693
<p>hi again ;D</p>
<p>tried to localize the problem with big chat_history size.</p>
<p>Setup:<br />
debian squeeze<br />
ejabberd 2.1.6 from source<br />
erlang R14A (happens with R140B too)<br />
LDAP auth<br />
muc_history, 10000</p>
<p>i setup two persistens chatrooms and piped many many messages to them.<br />
While pushing everything is fine...<br />
ram: 200-400/3000MB<br />
cpu: 4% load average</p>
<p>after about 10min. i tried to login using pidgin as xmppclient.<br />
I got some messages out of history and get a disconnect in pidgin.<br />
The jabberserver is now on high load... 80-100% cpu usage<br />
and consumes lot of ram... while i'm not connected anymore.</p>
<p>seems it prepares messages for my user to send.</p>
<p>Here's the log while my user is not connected and the load is very high:<br />
This code repeads for each message</p>
<div class="codeblock"><code>=INFO REPORT==== 8-Aug-2011::14:37:17 ===<br />D(<0.319.0>:ejabberd_router:313) : route<br /> from {jid,"test2","conference.host","test2","test2",<br /> "conference.host","test2"}<br /> to {jid,"my_user","host","33173486811312807007194284",<br /> "my_user","host","33173486811312807007194284"}<br /> packet {xmlelement,"message",<br /> [{"xml:lang","en"},<br /> {"to","test2@conference.host"},<br /> {"type","groupchat"}],<br /> [{xmlelement,"body",[],<br /> [{xmlcdata,<<"--- google.de ping statistics ---">>}]},<br /> {xmlelement,"delay",<br /> [{"xmlns","urn:xmpp:delay"},<br /> {"from","test2@conference.host"},<br /> {"stamp","2011-08-08T12:36:09Z"}],<br /> [{xmlcdata,[]}]},<br /> {xmlelement,"x",<br /> [{"xmlns","jabber:x:delay"},<br /> {"stamp","20110808T12:36:09"}],<br /> []}]}
<p>=INFO REPORT==== 8-Aug-2011::14:37:17 ===<br />D(<0.319.0>:ejabberd_local:286) : local route<br /> from {jid,"test2","conference.host","test2","test2",<br /> "conference.host","test2"}<br /> to {jid,"my_user","host","33173486811312807007194284",<br /> "my_user","host","33173486811312807007194284"}<br /> packet {xmlelement,"message",<br /> [{"xml:lang","en"},{"to",[...]},{[...],...}],<br /> [{xmlelement,[...],...},{xmlelement,...},{...}]}</p>
<p>=INFO REPORT==== 8-Aug-2011::14:37:17 ===<br />D(<0.319.0>:ejabberd_sm:410) : session manager<br /> from {jid,"test2","conference.host","test2","test2",<br /> "conference.host","test2"}<br /> to {jid,"my_user","host","33173486811312807007194284",<br /> "my_user","host","33173486811312807007194284"}<br /> packet {xmlelement,"message",<br /> [{"xml:lang","en"},{"to",[...]},{[...],...}],<br /> [{xmlelement,[...],...},{xmlelement,...},{...}]}</p>
<p>=INFO REPORT==== 8-Aug-2011::14:37:17 ===<br />D(<0.319.0>:ejabberd_sm:509) : sending to process <0.481.0></p></code></div>
<p>In the end i got the following error message:</p>
<div class="codeblock"><code>=INFO REPORT==== 8-Aug-2011::14:41:04 ===<br />D(<0.582.0>:ejabberd_router:313) : route<br /> from {jid,"my_user","host","35699611311312807051281432",<br /> "my_user","host","35699611311312807051281432"}<br /> to {jid,"test2","conference.host","test2","test2",<br /> "conference.host","test2"}<br /> packet {xmlelement,"message",<br /> [{"type","error"},<br /> {"from","test2@conference.host"},<br /> {"xml:lang","en"}],<br /> [{xmlelement,"body",[],<br /> [{xmlcdata,<br /> <<"rtt min/avg/max/mdev = 9.009/9.009/9.009/0.000 ms">>}]},<br /> {xmlelement,"delay",<br /> [{"xmlns","urn:xmpp:delay"},<br /> {"from","test2@conference.host"},<br /> {"stamp","2011-08-08T12:28:01Z"}],<br /> [{xmlcdata,[]}]},<br /> {xmlelement,"x",<br /> [{"xmlns","jabber:x:delay"},<br /> {"stamp","20110808T12:28:01"}],<br /> []},<br /> {xmlelement,"error",<br /> [{"code","503"},{"type","cancel"}],<br /> [{xmlelement,"service-unavailable",<br /> [{"xmlns","urn:ietf:params:xml:ns:xmpp-stanzas"}],<br /> []}]}]}
<p>Crash dump was written to: //var/log/ejabberd/erl_crash_20110808-142653.dump<br />eheap_alloc: Cannot allocate 1459620480 bytes of memory (of type "old_heap").<br />Aborted</p></code></div>
<p>While all of this action no other users can login as well.<br />
Seems like ejabberd is totally overpowered with the big history size.<br />
Is there any way to solve the problem? As ejabberd do not consume all memory as once, i don't think spending more ram will solve the disconnect problem.</p>
<p>Maybe there are some erlang tunings or stanze/fsm_que size settings wich can help me out.</p>
<p>Would be really nice if you can help me.</p>
Mon, 08 Aug 2011 13:11:51 +0000vince123comment 57693 at https://www.ejabberd.imthe problem does not appear
https://www.ejabberd.im/node/4877#comment-57678
<p>the problem does not appear immediately.<br />
First login problems began after 1-2 days.</p>
<p>i'll try to get a log of the error within the next days.</p>
Wed, 03 Aug 2011 10:28:10 +0000vince123comment 57678 at https://www.ejabberd.imvince123 wrote:
If i increase
https://www.ejabberd.im/node/4877#comment-57674
<div class="quote-msg">
<div class="quote-author"><em>vince123</em> wrote:</div>
<p>If i increase history_size in muc options to 10000 i got errors and people canÄt login anymore.<br />
Unfortunalety i don't have any error log now.</p></div>
<p>I don't get that problem. Show the error when you get it again.</p>
Tue, 02 Aug 2011 14:38:42 +0000mfosscomment 57674 at https://www.ejabberd.im