Hello<br><br>I&#39;ve upgraded to 3.1.2 and compiled with the  DEFS+= -DMI_SYSTEM_MALLOC option. Looking good so far. Any thoughts about my second question, that is, how to be aware from the scripts if the any problems has arisen in the mi command?<br>
<br>Thanks<br><br>Javi<br><br><div class="gmail_quote">On Mon, Feb 21, 2011 at 5:21 PM, Javier Gallart <span dir="ltr">&lt;<a href="mailto:jgallartm@gmail.com">jgallartm@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Thanks Henning,<div><br></div><div>I&#39;ll go with to recompile option and post the results...</div><div><br></div><div>Regards</div><div><br></div><div>Javier<br><br><div class="gmail_quote">2011/2/21 Henning Westerholt <span dir="ltr">&lt;<a href="mailto:henning.westerholt@1und1.de" target="_blank">henning.westerholt@1und1.de</a>&gt;</span><div>
<div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div>On Monday 21 February 2011, Javier Gallart wrote:<br>
&gt; we are running kamailio 3.1.1. Basically for every call it has to query a<br>
&gt; mtree that is reloaded every 15 minutes. The mtree table is about 4M<br>
&gt; records and  is stored in a Pgostgres database. For the reload we use the<br>
&gt; command mi mt_reload embedded in a xmlrpc request. The code for this is:<br>
&gt; route[XMLRPC]{<br>
&gt;         if (method == &quot;POST&quot; || method == &quot;GET&quot;)<br>
&gt;         {<br>
&gt;                 if (search(&quot;^User-Agent:&quot;))<br>
&gt;                 {<br>
&gt;                         xlog(&quot;xmlrpc request\n&quot;);<br>
&gt;                         set_reply_close();<br>
&gt;                         set_reply_no_connect(); # optional<br>
&gt;                         dispatch_rpc();<br>
&gt;                 }<br>
&gt;                 exit;<br>
&gt;         }<br>
&gt; }<br>
&gt; This server has been running with no issued for some weeks now, but at some<br>
&gt; point during the weekend the mi command started to fail. This is what the<br>
&gt; logs show:<br>
&gt;<br>
&gt; ERROR: &lt;core&gt; [db_res.c:181]: no private memory left<br>
&gt; ERROR: db_postgres [km_res.c:225]: could not allocate rows<br>
&gt; ERROR: db_postgres [km_dbase.c:280]: failed to convert rows<br>
&gt; ERROR: mtree [mtree_mod.c:627]: Error while fetching result<br>
&gt; ERROR: db_postgres [km_dbase.c:318]: invalid parameter value<br>
&gt; ERROR: mtree [mtree_mod.c:738]: cannot re-load info from database<br>
&gt;<br>
&gt; I&#39;ve restarted kamailio and now it&#39;s working fine. Should we increase the<br>
&gt; private memory? On the other hand, we&#39;d like to detect this failure<br>
&gt; condition on the script and act accordingly (for instance sending an email<br>
&gt; with an alarm message), is there anyway to do this?<br>
<br>
</div></div>Hi Javier,<br>
<br>
this probably caused of the fragmentation of the internal private memory pool<br>
from the frequent dumps and other load. You could increase the pool, or better<br>
- switch the MI to the system memory pool by uncommenting this line in<br>
kmi/Makefile<br>
<br>
#DEFS+= -DMI_SYSTEM_MALLOC<br>
<br>
and recompile the server.<br>
<br>
Cheers,<br>
<font color="#888888"><br>
Henning<br>
</font></blockquote></div></div></div><br></div>
</blockquote></div><br>