<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi Liviu.</p>
<p><br>
</p>
<p>Thank you for the replay.</p>
<p>I gave up of using "<tt>(db_mode = 0)". I was thinking about db_mode = 0 just to see if OpenSIPS could work without reporting lots of warnings in the log, as I see every day after letting some clients sending SIP REGISTER to this sip proxy during 3 or 4
hours (one by minute).</tt></p>
<p><tt>But, after a night of tests with db_mode = 0, I have concluded that even in this case OpenSIPS reports such warnings. Warnings about, for example: "core:utimer_ticker: utimer task <tm-utimer> already schedualed for 22814570 ms (now 22815250 ms), it may
overlap.." I was thinking that this issue related to the Sqlite. But it doesn't.</tt></p>
<p><br>
</p>
<p><tt>Now, I still have to create a very simple opensips.cfg script (one just handle SIP REGISTER messages) and see if I can discover why this sip proxy causes this issue. Maybe I have made some mistake in my script. After lots of warnings like this, my hardware
stops working.</tt></p>
<p><tt><br>
</tt></p>
<p><tt>Best regards.</tt></p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div class="BodyFragment"><font size="2">
<div class="PlainText">RODRIGO PIMENTA CARVALHO<br>
Inatel Competence Center<br>
Software<br>
Ph: +55 35 3471 9200 RAMAL 979<br>
</div>
</font></div>
</div>
</div>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>De:</b> users-bounces@lists.opensips.org <users-bounces@lists.opensips.org> em nome de Liviu Chircu <liviu@opensips.org><br>
<b>Enviado:</b> terça-feira, 19 de abril de 2016 09:15<br>
<b>Para:</b> users@lists.opensips.org<br>
<b>Assunto:</b> Re: [OpenSIPS-Users] How to avoid increasingly memory comsuption with AVPs?</font>
<div> </div>
</div>
<div><tt>Did you know that when doing a "lookup()" from script (registrar module), the "attr" AVP is also populated? Maybe you can use this information and rewrite that "avp_db_query" portion of your script in order to achieve the fast cache-querying logic
(db_mode = 0) you are talking about.</tt><br>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a title="Ctrl+Clique ou toque para seguir o link" id="LPlnk561542" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;" id="LPBorder_GT_14610711101440.2923824615229822">
<table style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);" id="LPContainer_14610711101000.32245903293692346" cellspacing="0">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td colspan="1" style="width: 250px; position: relative; display: table-cell; padding-right: 20px;" id="ImageCell_14610711101350.4754571558162558">
<div style="background-color: rgb(255, 255, 255); height: 99px; position: relative; margin: auto; display: table; width: 250px;" id="LPImageContainer_14610711101350.7032093080690837">
<a target="_blank" href="http://www.opensips-solutions.com/" style="display: table-cell; text-align: center;" id="LPImageAnchor_14610711101360.4164365857665415"><img aria-label="Imagem de visualização com link selecionado. Toque duas vezes para abrir o link." style="display: inline-block; margin-left: auto; margin-right: auto; max-width: 250px; max-height: 250px; height: 99px; width: 250px; border-width: 0px; vertical-align: bottom;" height="99" width="250" src="http://www.opensips-solutions.com/imgs/slideshow/slide3.jpg"></a></div>
</td>
<td colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;" id="TextCell_14610711101410.9521965186367651">
<div id="LPRemovePreviewContainer_14610711101410.32523777812872534"></div>
<div style="top: 0px; color: rgb(0, 120, 215); font-weight: 400; font-size: 21px; font-family: "wf_segoe-ui_light","Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; line-height: 21px;" id="LPTitle_14610711101410.15685735902986186">
<a target="_blank" href="http://www.opensips-solutions.com/" style="text-decoration: none;" id="LPUrlAnchor_14610711101420.052775054741220684">Home — OpenSIPS Solutions</a></div>
<div style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: "wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size: 14px; line-height: 14px;" id="LPMetadata_14610711101420.8795566740254771">
www.opensips-solutions.com</div>
<div style="display: block; color: rgb(102, 102, 102); font-weight: 400; font-family: "wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;" id="LPDescription_14610711101430.061870784399610024">
OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS is more than a SIP proxy/router as it includes application-level functionalities.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="moz-cite-prefix">On 19.04.2016 00:07, Rodrigo Pimenta Carvalho wrote:<br>
</div>
<blockquote type="cite">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi Liviu.</p>
<p><br>
</p>
<p><br>
</p>
<p>When I use "modparam("usrloc", "db_mode", 1)" the following query works fine and gives me the right result:<br>
</p>
<p><br>
</p>
<p>avp_db_query("select attr from location where contact like '$(ct.fields(uri){s.select,0,;})%' and username = '$fU'", "$avp(caller)");<br>
</p>
<p><br>
</p>
<p>When I use "modparam("usrloc", "db_mode", 0)" the above query doesn't give me the right value.</p>
<p><br>
</p>
<p>It is true because the query seems to acts only over the database, not over data from cached memory. And in this case the data from database obviously is not equal to that from cached memory. As you told me: "<tt>"db_mode" of the usrloc module has nothing
to do with "avp_db_query"</tt>"</p>
<p><br>
</p>
<p>So, in this case, how to execute queries over data from cached memory?</p>
<p><br>
</p>
<p>Any hint will be very helpful!<br>
</p>
<p><br>
</p>
<p>Best regards.<br>
</p>
<p><br>
</p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div class="BodyFragment"><font size="2">
<div class="PlainText">RODRIGO PIMENTA CARVALHO<br>
Inatel Competence Center<br>
Software<br>
Ph: +55 35 3471 9200 RAMAL 979<br>
</div>
</font></div>
</div>
</div>
<br>
<br>
<div style="color:rgb(0,0,0)">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>De:</b>
<a class="moz-txt-link-abbreviated" href="mailto:users-bounces@lists.opensips.org">
users-bounces@lists.opensips.org</a> <a class="moz-txt-link-rfc2396E" href="mailto:users-bounces@lists.opensips.org">
<users-bounces@lists.opensips.org></a> em nome de Liviu Chircu <a class="moz-txt-link-rfc2396E" href="mailto:liviu@opensips.org">
<liviu@opensips.org></a><br>
<b>Enviado:</b> segunda-feira, 18 de abril de 2016 10:50<br>
<b>Para:</b> <a class="moz-txt-link-abbreviated" href="mailto:users@lists.opensips.org">
users@lists.opensips.org</a><br>
<b>Assunto:</b> Re: [OpenSIPS-Users] How to avoid increasingly memory comsuption with AVPs?</font>
<div> </div>
</div>
<div><tt>Yes you can, "db_mode" of the usrloc module has nothing to do with "avp_db_query" from the avpops module! :)</tt>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a title="Ctrl+Clique ou toque para seguir o link" id="LPlnk576238" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div id="LPBorder_GT_14610132111630.6391455703826809" style="margin-bottom:20px; overflow:auto; width:100%; text-indent:0px" contenteditable="false">
<table id="LPContainer_14610132111600.7656256304926659" style="width:90%; background-color:rgb(255,255,255); overflow:auto; padding-top:20px; padding-bottom:20px; margin-top:20px; border-top:1px dotted rgb(200,200,200); border-bottom:1px dotted rgb(200,200,200)" cellspacing="0">
<tbody>
<tr style="border-spacing:0px" valign="top">
<td colspan="1" id="ImageCell_14610132111610.76708630189011" style="width:250px; display:table-cell; padding-right:20px">
<div id="LPImageContainer_14610132111610.21610823534496926" style="background-color:rgb(255,255,255); height:0px; margin:auto; display:table; width:0px">
<a target="_blank" href="http://www.opensips-solutions.com/" id="LPImageAnchor_14610132111620.7267541445565867" style="display:table-cell; text-align:center"><img style="display:inline-block; margin-left:auto; margin-right:auto; max-width:250px; max-height:250px; height:99px; width:250px; border-width:0px; vertical-align:bottom" height="99" width="250" src="http://www.opensips-solutions.com/imgs/slideshow/slide3.jpg"></a></div>
</td>
<td colspan="2" id="TextCell_14610132111620.7739613079444125" style="vertical-align:top; padding:0px; display:table-cell">
<div id="LPTitle_14610132111620.14754722172202683" style=""><a target="_blank" href="http://www.opensips-solutions.com/" id="LPUrlAnchor_14610132111630.02617029266672566" style="text-decoration:none">Home — OpenSIPS Solutions</a></div>
<div id="LPMetadata_14610132111630.6997381698413069" style=""><a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></div>
<div id="LPDescription_14610132111630.1889454696177959" style="">OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS is more than a SIP proxy/router as it includes application-level functionalities.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="moz-cite-prefix">On 18.04.2016 15:10, Rodrigo Pimenta Carvalho wrote:<br>
</div>
<blockquote type="cite">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi Liviu.</p>
<p><br>
</p>
<p>Thank you very much!</p>
<p>So, I'm comfortable with OpenSIPS.</p>
<p><br>
</p>
<p>In my OpenSIPS config file I have:</p>
<p><br>
</p>
<p>loadmodule "usrloc.so"<br>
modparam("usrloc", "db_mode", 2) <br>
</p>
<p><br>
</p>
<p>Can I change db_mode to zero and still have every avp_db_query working well?</p>
<p>That is, with db_mode=0 I will avoid using Sqlite and every SQL operation over user location will apply just over data in memory cache. Am I correct?</p>
<p><br>
</p>
<p>Any hint will be very helpful!</p>
</div>
</blockquote>
<br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset> <br>
<pre>_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
</div>
</div>
</body>
</html>