ejabberd - Comments for "mod_archive - Message Archiving (XEP-0136)" https://www.ejabberd.im/mod_archive en Sorry, we cannot reproduce https://www.ejabberd.im/mod_archive#comment-65526 <p>Sorry, we cannot reproduce your duplicate issue. This is working fine for me.</p> Wed, 06 May 2015 14:20:30 +0000 mremond comment 65526 at https://www.ejabberd.im [FIX] Ejabberd offline messages with wrong timestamp https://www.ejabberd.im/mod_archive#comment-65520 <p>To retrive archive store with correct timestamp see: <noindex><a href="http://egoncalves.com.br/ejabberd/ejabberd-offline-messages-with-wrong-timestamp/" title="http://egoncalves.com.br/ejabberd/ejabberd-offline-messages-with-wrong-timestamp/" rel="nofollow" >http://egoncalves.com.br/ejabberd/ejabberd-offline-messages-with-wrong-t...</a></noindex></p> Tue, 05 May 2015 15:03:14 +0000 egoncalves comment 65520 at https://www.ejabberd.im Please help me to setup for store the ejabberd messages in db. https://www.ejabberd.im/mod_archive#comment-65211 <p>Can you please instruct me to setup the ejabberd for store the messages in my database.</p> <p>I try the setup but, after that i am not able to login to the admin panel in browser or create a new user.<br /> I follow this <noindex><a href="http://srijan.me/ejabberd-storing-data-in-mysql/" title="http://srijan.me/ejabberd-storing-data-in-mysql/" rel="nofollow" >http://srijan.me/ejabberd-storing-data-in-mysql/</a></noindex> for setup the ejabberd, but not working. I also need to configure it with the MongoDB.</p> <p>Your help is appreciated.</p> <p>Thanks. </p> <div class="quote-msg"> <div class="quote-author"><em>bottin</em> wrote:</div> <p>Hi,<br /> I set the mod_archive_odbc in my server and apparently work. But when I send a offline message to any contact, the mod_archive_odbc save in database the message, then when the contact receive the message the mod_archive_odbc save again the same message. Resulting in something like that:</p> <div class="codeblock"><code>+----+---------+---------------------+------+-----------------+------+<br />| id | coll_id | utc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | dir&nbsp; | body&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | name |<br />+----+---------+---------------------+------+-----------------+------+<br />|&nbsp; 1 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 | 2012-10-25 16:35:24 |&nbsp;&nbsp;&nbsp; 1 | offline message |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br />|&nbsp; 2 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3 | 2012-10-25 16:35:24 |&nbsp;&nbsp;&nbsp; 0 | offline message |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br />|&nbsp; 3 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3 | 2012-10-25 16:35:32 |&nbsp;&nbsp;&nbsp; 0 | offline message |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |</code></div> <p>Initially I think it's a problem in my javascript client, but I tested it in other clients and all to the same.</p> <p>Now I don't know if it is a server problem or a client bad implementation problem.</p> <p>Anyone have a ideia how to fix it or a better way to do that?</p> <p>Thank you and sorry for my english,</p> <p>Bottin</p> <p>P.S.: I tryed the mod_offline and the mod_offline_odbc</p></div> Thu, 22 Jan 2015 11:00:15 +0000 hitesh comment 65211 at https://www.ejabberd.im mod_archive crash https://www.ejabberd.im/mod_archive#comment-63914 <p>hi,</p> <p>i want to use mod_archive module. i have downloaded ejabberd modules and follow the step in <a href="http://www.ejabberd.im/ejabberd-modules" title="http://www.ejabberd.im/ejabberd-modules">http://www.ejabberd.im/ejabberd-modules</a>. i have generated mod_archive.beam file by compiling mod_archive.erl and put this file in Applications/ejabberd-13.12/lib/ejabberd-13.12/ebin (mac os).<br /> but when start module i got following crash report.</p> <p>2014-04-22 12:07:13 =CRASH REPORT====<br /> crasher:<br /> initial call: mod_archive:init/1<br /> pid: &lt;0.505.0&gt;<br /> registered_name: []<br /> exception exit: {{{case_clause,undefined},[{gen_iq_handler,add_iq_handler,6,[{file,"src/gen_iq_handler.erl"},{line,65}]},{mod_archive,init,1,[{file,"mod_archive.erl"},{line,126}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,328}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}<br /> ancestors: [ejabberd_sup,&lt;0.37.0&gt;]<br /> messages: []<br /> links: [&lt;0.308.0&gt;]<br /> dictionary: []<br /> trap_exit: false<br /> status: running<br /> heap_size: 610<br /> stack_size: 27<br /> reductions: 164<br /> neighbours:</p> <p>please, can anyone help me.<br /> thanks in advance.</p> Tue, 22 Apr 2014 07:29:41 +0000 iphone.prolix comment 63914 at https://www.ejabberd.im Hi. Seems that I have the https://www.ejabberd.im/mod_archive#comment-62353 <p>Hi. </p> <p>Seems that I have the same problem with mod_archive<br /> Do you know solution of this problem?</p> Sat, 21 Dec 2013 10:10:38 +0000 Johnny Samoletov comment 62353 at https://www.ejabberd.im Hi, I have the same problem https://www.ejabberd.im/mod_archive#comment-59518 <p>Hi, I have the same problem like yours.</p> <p>Have you found a way to fix it or workaround? Please share me too. Many thanks!</p> Tue, 26 Mar 2013 12:02:35 +0000 durianjc comment 59518 at https://www.ejabberd.im Problem with mod_archive_odbc and offline messages https://www.ejabberd.im/mod_archive#comment-59230 <p>Hi,<br /> I set the mod_archive_odbc in my server and apparently work. But when I send a offline message to any contact, the mod_archive_odbc save in database the message, then when the contact receive the message the mod_archive_odbc save again the same message. Resulting in something like that:</p> <div class="codeblock"><code>+----+---------+---------------------+------+-----------------+------+<br />| id | coll_id | utc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | dir&nbsp; | body&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | name |<br />+----+---------+---------------------+------+-----------------+------+<br />|&nbsp; 1 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 | 2012-10-25 16:35:24 |&nbsp;&nbsp;&nbsp; 1 | offline message |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br />|&nbsp; 2 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3 | 2012-10-25 16:35:24 |&nbsp;&nbsp;&nbsp; 0 | offline message |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br />|&nbsp; 3 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3 | 2012-10-25 16:35:32 |&nbsp;&nbsp;&nbsp; 0 | offline message |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |</code></div> <p>Initially I think it's a problem in my javascript client, but I tested it in other clients and all to the same.</p> <p>Now I don't know if it is a server problem or a client bad implementation problem.</p> <p>Anyone have a ideia how to fix it or a better way to do that?</p> <p>Thank you and sorry for my english,</p> <p>Bottin</p> <p>P.S.: I tryed the mod_offline and the mod_offline_odbc</p> Thu, 25 Oct 2012 18:20:15 +0000 bottin comment 59230 at https://www.ejabberd.im any plans to add Oracle and/or SQL Server support to mod_archive https://www.ejabberd.im/mod_archive#comment-58497 <p>Would like to know if there are any plans to add Oracle and/or SQL server support to mod_archive.</p> <p>Also, am interested to know if DB calls are asynchronous and if there are issues w/ memory consumption under heavy load (e.g., queue of db writes grows). I know that IM compliance/proxy solutions like Actiance deal with this by writing to a persistent message queue (MSMQ) because write time to a queue is much faster than the db while having the benefit of being persistent and have a separate process to perform the db write (sometimes in bulk).</p> <p>Dave</p> Wed, 04 Apr 2012 14:49:57 +0000 dlevine278 comment 58497 at https://www.ejabberd.im In accordance to XEP-0136. https://www.ejabberd.im/mod_archive#comment-57982 <p>In accordance to XEP-0136.</p> Tue, 01 Nov 2011 02:32:29 +0000 mikekaganski comment 57982 at https://www.ejabberd.im How to access archived message at client side. https://www.ejabberd.im/mod_archive#comment-57981 <p>Hi,<br /> I used text based chat functionality into my android application, and it possible by smack library for XMPP, my server also implement XEP-0136 archive protocol properly. So now i want to know the way that how to access archived message from server at client side.<br /> please reply as quick as possible, it is very urgent.<br /> Thanks in advance.</p> Mon, 31 Oct 2011 10:23:57 +0000 sumeet comment 57981 at https://www.ejabberd.im You don't need to configure https://www.ejabberd.im/mod_archive#comment-57542 <p>You don't need to configure client for this feature to work. Just set up ejabberd+mod_archive_mysql. As long as you will see history items coming into history table in mysql - it's working.</p> Wed, 29 Jun 2011 15:11:45 +0000 Shadowcaster comment 57542 at https://www.ejabberd.im date error using postgresql as backend https://www.ejabberd.im/mod_archive#comment-57260 <p>i am having huge trouble getting mod_archive to work using postgresql via odbc as a backend.</p> <p>when trying to retrieve messages from the archive i get the following error:</p> <div class="codeblock"><code>LOG:&nbsp; statement: begin;<br />LOG:&nbsp; statement: select * from archive_collections where us = &#039;foo&#039; and deleted = 0 and with_user = &#039;bar&#039; and with_server = &#039;baz&#039; and with_resource = &#039;bin&#039; and utc = &#039;2011-04-27 20:43:12&#039;<br />LOG:&nbsp; statement: select count(*) from archive_messages where coll_id = 3 and utc &gt;= &#039;0000-01-01 00:00:00&#039;&nbsp; and utc &lt; &#039;2038-01-19 00:00:00&#039;&nbsp; <br />ERROR:&nbsp; date/time field value out of range: &quot;0000-01-01 00:00:00&quot; at character 68<br />STATEMENT:&nbsp; select count(*) from archive_messages where coll_id = 3 and utc &gt;= &#039;0000-01-01 00:00:00&#039;&nbsp; and utc &lt; &#039;2038-01-19 00:00:00&#039;&nbsp; <br />LOG:&nbsp; statement: ROLLBACK<br />LOG:&nbsp; statement: rollback;</code></div> <p>any hint is highly appreciated.</p> Wed, 27 Apr 2011 21:40:21 +0000 elm0 comment 57260 at https://www.ejabberd.im Patch for mod_archive_webview https://www.ejabberd.im/mod_archive#comment-57084 <p>Patch given at <noindex><a href="http://www.ndl.kiev.ua/content/mod_archive_odbc-release#comment-265" title="http://www.ndl.kiev.ua/content/mod_archive_odbc-release#comment-265" rel="nofollow" >http://www.ndl.kiev.ua/content/mod_archive_odbc-release#comment-265</a></noindex> fixes the issue because of which mod_archive_webview was not working. The patch has been tested with ejabberd 2.1.5 and mod_archive r1057 in Debian Squeeze. Here is a copy of the patch.</p> <div class="codeblock"><code>Index: src/mod_archive_webview.erl<br />===================================================================<br />--- src/mod_archive_webview.erl (revision 1109)<br />+++ src/mod_archive_webview.erl (working copy)<br />@@ -102,7 +102,7 @@<br />&nbsp;&nbsp;&nbsp;&nbsp; make_xhtml(?T(&quot;Chat with &quot;) ++ Jid, contact_config(Jid,US,Lang) ++<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [?XE(&quot;ul&quot;, lists:map( fun({Id, Node, Server, Resource, Utc, Subject }) -&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With = jlib:jid_to_string({Node,Server,Resource}),<br />-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ?LI([?AC(?LINK(&quot;show/&quot; ++ integer_to_list(Id)), &quot;On &quot; ++ Utc ++ &quot; with &quot; ++ With ++ &quot; -&gt; &quot; ++ escape_str(Subject)&nbsp; )] ) end,<br />+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ?LI([?AC(?LINK(&quot;show/&quot; ++ Id), &quot;On &quot; ++ Utc ++ &quot; with &quot; ++ With ++ &quot; -&gt; &quot; ++ escape_str(Subject)&nbsp; )] ) end,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get_collection_list(jlib:string_to_jid(Jid), US)))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ], Lang); <p>@@ -207,7 +207,7 @@<br /> %------------------------</p> <p> format_message({ Utc, Dir, Body } ,{WithU,WithS,WithR}, {LUser,LServer} ) -&gt;<br />-&nbsp;&nbsp;&nbsp; {From, Class} = case Dir of <br />+&nbsp;&nbsp;&nbsp; {From, Class} = case list_to_integer(Dir) of <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 -&gt; { jlib:jid_to_string({WithU,WithS,WithR}) , &quot;message_from&quot; } ;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 -&gt; { jlib:jid_to_string({LUser,LServer,&quot;&quot;}) , &quot;message_to&quot; } <br />&nbsp;&nbsp;&nbsp;&nbsp; end,<br />@@ -411,7 +411,7 @@</p> <p> format_search_result( {Id,Subject,User,Server,Resource,Utc,Body} ,_Lang) -&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp; ?XAE(&quot;p&quot;,[{&quot;class&quot;,&quot;search_result&quot;}],<br />-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [?AC(?LINK(&quot;show/&quot; ++ integer_to_list(Id)), jlib:jid_to_string({User,Server,Resource}) ++ &quot; : &quot; ++ escape_str(Subject)),<br />+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [?AC(?LINK(&quot;show/&quot; ++ Id), jlib:jid_to_string({User,Server,Resource}) ++ &quot; : &quot; ++ escape_str(Subject)),<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ?C(Body), ?XE(&quot;em&quot;,[?C(Utc)]) ] ).<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /> links_previous_next({PrevId,NextId},Lang) -&gt;<br />@@ -422,7 +422,7 @@<br /> links_previous_next_aux(Class, Text, Id) -&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp; case Id of<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -1 -&gt; [];<br />-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _ -&gt; [?XAE(&quot;a&quot;,[{&quot;href&quot;,?LINK(&quot;show/&quot; ++ integer_to_list(Id))},{&quot;class&quot;,Class}], [?C(Text)])]<br />+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _ -&gt; [?XAE(&quot;a&quot;,[{&quot;href&quot;,?LINK(&quot;show/&quot; ++ Id)},{&quot;class&quot;,Class}], [?C(Text)])]<br />&nbsp;&nbsp;&nbsp;&nbsp; end.</p> <p> %------------------------</p></code></div> Sat, 19 Feb 2011 12:07:30 +0000 amaramrahul comment 57084 at https://www.ejabberd.im Hi, I am using ejabberd https://www.ejabberd.im/mod_archive#comment-57079 <p>Hi, I am using ejabberd ejabberd-2.1.5 on FreeBSD which has been patched with mod_archive module taken from trunk. I have followed all the instructions in README.txt and <a>http://www.ndl.kiev.ua/content/mod_archive_odbc-release</a> for setting it up.<br /> But I have error in ejabberd.log</p> <div class="codeblock"><code>=ERROR REPORT==== 2011-02-17 19:46:54 ===<br />E(&lt;0.36.0&gt;:gen_mod:73) : {undef,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [{mod_archive_odbc,start,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {wipeout_interval,86400}]]},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {gen_mod,start_module,3},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {lists,foreach,2},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {ejabberd_app,start,2},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {application_master,start_it_old,4}]}</code></div> <p>Please help!...</p> Fri, 18 Feb 2011 19:30:17 +0000 savio comment 57079 at https://www.ejabberd.im Internal Server Error when attempting to list a collection https://www.ejabberd.im/mod_archive#comment-56787 <p>Hi,<br /> I've sometimes issues to listing a collection.<br /> The XMPP stanzas that fail are something like this:</p> <pre> &lt;iq type='get' xmlns='jabber:client'&gt; &lt;list xmlns='http://www.xmpp.org/extensions/xep-0136.html#ns' with='test@localhost' start='2010-11-2T00:00:00.000000Z'&gt; &lt;set xmlns='http://jabber.org/protocol/rsm'&gt; &lt;max&gt;5&lt;/max&gt; &lt;/set&gt; &lt;/list&gt; &lt;/iq&gt; </pre><p> There are days it works like a charm and days where I get an "internal server error" as response.<br /> After restarting the ejabberd server it works again.<br /> I've seen a similar issue on <noindex><a href="http://www.ndl.kiev.ua/content/mod_archive_odbc-release" title="http://www.ndl.kiev.ua/content/mod_archive_odbc-release" rel="nofollow" >http://www.ndl.kiev.ua/content/mod_archive_odbc-release</a></noindex> but it was<br /> a PosgreSQL problem.</p> <p>My config is:<br /> - ejabberd version ejabberd-2.1.3<br /> - mod_archive_odbc at revision 1057 from <noindex><a href="https://svn.process-one.net/ejabberd-modules/mod_archive" title="https://svn.process-one.net/ejabberd-modules/mod_archive" rel="nofollow" >https://svn.process-one.net/ejabberd-modules/mod_archive</a></noindex><br /> - RDBMS MySQL 5.0.26</p> <p>ejabberd.cfg</p> <p>{mod_archive_odbc, [{database_type, "mysql"},<br /> {default_auto_save, true},<br /> {enforce_default_auto_save, true},<br /> {default_expire, infinity},<br /> {enforce_min_expire, 0},<br /> {enforce_max_expire, infinity},<br /> {replication_expire, 31536000},<br /> {session_duration, 1800},<br /> {wipeout_interval, 86400}]},</p> <p>the config is a result of <noindex><a href="http://www.ndl.kiev.ua/content/mod_archive_odbc-release" title="http://www.ndl.kiev.ua/content/mod_archive_odbc-release" rel="nofollow" >http://www.ndl.kiev.ua/content/mod_archive_odbc-release</a></noindex></p> <p>The log looks like this :</p> <p>E(&lt;0.2977.0&gt;:mod_archive_odbc:2428) : failed transaction: {aborted,<br /> {{badmatch,<br /> {aborted,<br /> "query timed out"}},<br /> [{mod_archive_odbc,<br /> get_last_inserted_id,<br /> 2},<br /> {mod_archive_odbc,<br /> get_collection_id,<br /> 1},<br /> {mod_archive_odbc,<br /> new_dict_answer,<br /> 5},<br /> {mod_archive_odbc,<br /> '-do_log/12-fun-0-',<br /> 13},<br /> {ejabberd_odbc,<br /> outer_transaction,<br /> 3},<br /> {ejabberd_odbc,<br /> session_established,<br /> 3},<br /> {p1_fsm,<br /> handle_msg,10},<br /> {proc_lib,<br /> init_p,5}]}}, stack: {backtrace,<br /> &lt;&lt;"Program counter: 0xb7c234e4 (unknown function)\nCP: 0xb30dfb00 (mod_archive_odbc:run_sql_transaction/2 + 232)\n\n0xb3effe24 Return addr 0xb30d3da4 (mod_archive_odbc:do_log/12 + 256)\ny(0) {aborted,{{badmatch,{aborted,\"query timed out\"}},[{mod_archive_odbc,get_last_inserted_id,2},{mod_archive_odbc,get_collection_id,1},{mod_archive_odbc,new_dict_answer,5},{mod_archive_odbc,'-do_log/12-fun-0-',13},{ejabberd_odbc,outer_transaction,3},{ejabberd_odbc,session_established,3},{p1_fsm,handle_msg,10},{proc_lib,init_p,5}]}}\n\n0xb3effe2c Return addr 0xb30d2a78 (mod_archive_odbc:handle_cast/2 + 460)\ny(0) []\ny(1) []\ny(2) []\ny(3) {dict,0,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}}\ny(4) []\ny(5) []\ny(6) []\ny(7) []\ny( []\ny(9) []\ny(10) []\n\n0xb3effe5c Return addr 0xb6a59d14 (gen_server:handle_msg/5 + 932)\ny(0) []\ny(1) []\ny(2) []\ny(3) []\ny(4) []\ny(5) []\ny(6) []\ny(7) []\ny( []\ny(9) []\ny(10) []\ny(11) []\ny(12) {state,\"handelsplattform.zentrale.de\",{dict,0,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}},1800}\n\n0xb3effe94 Return addr 0xb6a637ec (proc_lib:init_p/5 + 200)\ny(0) mod_archive_odbc\ny(1) {state,\"handelsplattform.zentrale.de\",{dict,0,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}},1800}\ny(2) 'ejabberd_mod_archive_odbc_handelsplattform.zentrale.de'\ny(3) &lt;0.251.0&gt;\ny(4) {'$gen_cast',{addlog,\"chat\",to,\"vmuth\",\"handelsplattform.zentrale.de\",\"40554349641283841483603324\",{jid,\"mttest\",\"handelsplattform.zentrale.de\",[],\"mttest\",\"handelsplattform.zentrale.de\",[]},[],[],[],\"wird das auf der db hinterlegt?\"}}\ny(5) Catch 0xb6a59d14 (gen_server:handle_msg/5 + 932)\n\n0xb3effeb0 Return addr 0x081dbe40 ()\ny(0) Catch 0xb6a637fc (proc_lib:init_p/5 + 216)\ny(1) gen\ny(2) init_it\ny(3) [gen_server,&lt;0.251.0&gt;,&lt;0.251.0&gt;,{local,'ejabberd_mod_archive_odbc_handelsplattform.zentrale.de'},mod_archive_odbc,[\"handelsplattform.zentrale.de\",[{database_type,\"mysql\"},{default_auto_save,true},{enforce_default_auto_save,true},{default_expire,infinity},{enforce_min_expire,0},{enforce_max_expire,infinity},{replication_expire,31536000},{session_duration,1800},{wipeout_interval,86400}]],[]]\n"&gt;&gt;}</p> <p>=ERROR REPORT==== 2010-09-07 08:39:23 ===<br /> E(&lt;0.2977.0&gt;:mod_archive_odbc:489) : error when performing automated archiving: {xmlelement,<br /> "error",<br /> [{"code",<br /> "500"},<br /> {"type",<br /> "wait"}],<br /> [{xmlelement,<br /> "internal-server-error",<br /> [{"xmlns",<br /> "urn:ietf:params:xml:ns:xmpp-stanzas"}],<br /> []}]}</p> Tue, 02 Nov 2010 13:13:44 +0000 wintermute comment 56787 at https://www.ejabberd.im