[OpenSIPS-Users] How to avoid increasingly memory comsuption with AVPs?

Rodrigo Pimenta Carvalho pimenta at inatel.br
Tue Apr 19 15:13:35 CEST 2016


Hi Liviu.


Thank you for the replay.

I gave up of using "(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).

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.


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.


Best regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979


________________________________
De: users-bounces at lists.opensips.org <users-bounces at lists.opensips.org> em nome de Liviu Chircu <liviu at opensips.org>
Enviado: terça-feira, 19 de abril de 2016 09:15
Para: users at lists.opensips.org
Assunto: Re: [OpenSIPS-Users] How to avoid increasingly memory comsuption with AVPs?

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.

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

[http://www.opensips-solutions.com/imgs/slideshow/slide3.jpg]<http://www.opensips-solutions.com/>

Home — OpenSIPS Solutions<http://www.opensips-solutions.com/>
www.opensips-solutions.com
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.

On 19.04.2016 00:07, Rodrigo Pimenta Carvalho wrote:

Hi Liviu.



When I use "modparam("usrloc", "db_mode", 1)" the following query works fine and gives me the right result:


avp_db_query("select attr from location where contact like '$(ct.fields(uri){s.select,0,;})%' and username = '$fU'", "$avp(caller)");


When I use "modparam("usrloc", "db_mode", 0)" the above query doesn't give me the right value.


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: ""db_mode" of the usrloc module has nothing to do with "avp_db_query""


So, in this case, how to execute queries over data from cached memory?


Any hint will be very helpful!


Best regards.



RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979


________________________________
De: users-bounces at lists.opensips.org<mailto:users-bounces at lists.opensips.org> <users-bounces at lists.opensips.org><mailto:users-bounces at lists.opensips.org> em nome de Liviu Chircu <liviu at opensips.org><mailto:liviu at opensips.org>
Enviado: segunda-feira, 18 de abril de 2016 10:50
Para: users at lists.opensips.org<mailto:users at lists.opensips.org>
Assunto: Re: [OpenSIPS-Users] How to avoid increasingly memory comsuption with AVPs?

Yes you can, "db_mode" of the usrloc module has nothing to do with "avp_db_query" from the avpops module! :)

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

[http://www.opensips-solutions.com/imgs/slideshow/slide3.jpg]<http://www.opensips-solutions.com/>

Home — OpenSIPS Solutions<http://www.opensips-solutions.com/>
www.opensips-solutions.com<http://www.opensips-solutions.com>
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.

On 18.04.2016 15:10, Rodrigo Pimenta Carvalho wrote:

Hi Liviu.


Thank you very much!

So, I'm comfortable with OpenSIPS.


In my OpenSIPS config file I have:


loadmodule "usrloc.so"
modparam("usrloc", "db_mode",   2)


Can I change db_mode to zero and still have every avp_db_query working well?

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?


Any hint will be very helpful!




_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160419/41ce5876/attachment.htm>


More information about the Users mailing list