[OpenSIPS-Users] What does exactally mean lots of warnings about timer_ticker in the log (OpenSIPS 2.1)?

Rodrigo Pimenta Carvalho pimenta at inatel.br
Thu Feb 25 13:48:15 CET 2016


Ok Bogdan.

Thank you for the hint.

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


________________________________
De: Bogdan-Andrei Iancu <bogdan at opensips.org>
Enviado: quarta-feira, 24 de fevereiro de 2016 19:33
Para: OpenSIPS users mailling list; Rodrigo Pimenta Carvalho
Assunto: Re: [OpenSIPS-Users] What does exactally mean lots of warnings about timer_ticker in the log (OpenSIPS 2.1)?

Hi,

The avp_db_query's are simply killing the performance out of your opensips - there are complex queries across large tables :( . Such queries, step by step, were blocking all the opensips processes, leaving none able to run the timer jobs.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

[http://www.opensips-solutions.com/imgs/opensips-solutions-logo.gif]<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 24.02.2016 14:00, Rodrigo Pimenta Carvalho wrote:

Ok Bogdan and Eric.


In my system generally I have just 5 online accounts (we are still developing the our project) and my nathelper configuration is:


####  NAT modules
loadmodule "nathelper.so"
modparam("nathelper", "natping_interval", 10)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "received_avp", "$avp(received_nh)")

I will change the interval to 60. But I'm not sure it will solve the issue, because right now I have just one account online and getting lots of those Warnings in my log.


By the way, maybe the SQL queries in my opensips.cfg is causing the problem. For example, I have queries like this:


    avp_db_query("DELETE FROM acc WHERE time IN (SELECT time FROM acc UNION SELECT time FROM missed_calls ORDER BY time DESC LIMIT 300 OFFSET 150)");
    avp_db_query("DELETE FROM missed_calls WHERE time IN (SELECT time FROM acc UNION SELECT time FROM missed_calls ORDER BY time DESC LIMIT 300 OFFSET 150)");


I was thinking whether this complex queries is taken much time to be executed.


Is avp_db_query synchronous or asynchronous?


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 Bogdan-Andrei Iancu <bogdan at opensips.org><mailto:bogdan at opensips.org>
Enviado: terça-feira, 23 de fevereiro de 2016 19:22
Para: OpenSIPS users mailling list
Assunto: Re: [OpenSIPS-Users] What does exactally mean lots of warnings about timer_ticker in the log (OpenSIPS 2.1)?

Shortly, what Eric wants to say is that your timer interval to ping is too short to actually manage to ping all your contacts. Like you want to ping every 30 seconds, but to ping them all (one time) takes 40 seconds.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

[http://www.opensips-solutions.com/imgs/opensips-solutions-logo.gif]<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 23.02.2016 23:22, Eric Tamme wrote:
Hey again Rodrigo,

I had further discussions with Bogdan which I will summarize here in an attempt to clarify.

Because the new 2.x system is implemented as a reactor, the implementation of timer based callbacks has changed.  There is a single timer process who's only job is to keep track of jobs that are to be scheduled, when it decides a job/callback needs to happen because of the current time, it writes to a shared pipe which is read by ALL other processes of the reactor.  Any reactor process that is free, will take this callback off the pipe and run it.  In this way, there is no way to actually block the timer process.

However, what can happen, and what I believe you are seeing here is that the timer process has not finished going through the list of timer handlers and it should have started processing the list again already - so the timer list scan is overlapping.

I'm not 100% sure how this can happen, perhaps you have a very long timer list and it is causing the timer process to fail to complete before its next scheduled iteration - either than or it is not able to write to the shared pipe for some reason.

I would bring the question to either IRC, or to the devel list with as much detail as possible.

-Eric


On 02/23/2016 01:59 PM, Rodrigo Pimenta Carvalho wrote:

Ok Eric.


Thank you very much.

I will analyze my OpenSIPS configuration and try to discover what action is causing the block situation.


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> <mailto:users-bounces at lists.opensips.org> <users-bounces at lists.opensips.org><mailto:users-bounces at lists.opensips.org> em nome de Eric Tamme <eric at uphreak.com><mailto:eric at uphreak.com>
Enviado: terça-feira, 23 de fevereiro de 2016 17:51
Para: OpenSIPS users mailling list
Assunto: Re: [OpenSIPS-Users] What does exactally mean lots of warnings about timer_ticker in the log (OpenSIPS 2.1)?

I was just speaking with bogdan, apparently i am wrong.  he said:

"no, there is no way to do that, as right now any process (SIP worker) can execute (if free) the timer jobs, and the timer_partitions in TM has nothing to do with that change (in how timer jobs are executed)"

So ... i guess you need to prevent any type of blocking operations ...

-Eric

On 02/23/2016 01:34 PM, Rodrigo Pimenta Carvalho wrote:

Ok Eric.

Thank you. I will try  this and see what will be the result.

Thanks a lot.


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


________________________________
De: <mailto:users-bounces at lists.opensips.org> 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 Eric Tamme <eric at uphreak.com><mailto:eric at uphreak.com>
Enviado: terça-feira, 23 de fevereiro de 2016 17:23
Para: OpenSIPS users mailling list
Assunto: Re: [OpenSIPS-Users] What does exactally mean lots of warnings about timer_ticker in the log (OpenSIPS 2.1)?

I believe this has been refactored under 2.X as a result ofthe async work.  I think the new settings are "timer partitions" here is the tm documentation discussing the timer partition setting: http://www.opensips.org/html/docs/modules/2.1.x/tm.html#id294483
tm Module - OpenSIPS<http://www.opensips.org/html/docs/modules/2.1.x/tm.html#id294483>
<http://www.opensips.org>www.opensips.org<http://www.opensips.org>
TM module enables stateful processing of SIP transactions. The main use of stateful logic, which is costly in terms of memory and CPU, is some services inherently ...



-Eric

On 02/23/2016 12:57 PM, Rodrigo Pimenta Carvalho wrote:

Hi Eric Tamme.


I have just searched about Timer in the module docs, but I didn't find any thing about how to manager Timers in OpenSIPS, as you commented.

Do you know what part of the documentation tells about "dedicated timer processes"?


BTW, my project is embedded.


Any hint will be very helpful!


Thanks a lot!


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


________________________________
De: <mailto:users-bounces at lists.opensips.org> 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 Eric Tamme <eric at uphreak.com><mailto:eric at uphreak.com>
Enviado: segunda-feira, 22 de fevereiro de 2016 14:35
Para: OpenSIPS users mailling list
Assunto: Re: [OpenSIPS-Users] What does exactally mean lots of warnings about timer_ticker in the log (OpenSIPS 2.1)?

Many things share the same timer, dialog expiration cleanup, userlocation cleanup, nathelper pings etc.  If one of the processes that is triggered by a timer route blocks for some period of time - aka a hung db query, it will cause the timer to "drift" and you will get logs indicating that a process that should have takeng X amount of time actually took Y amount of time - this is due to the blocking operation.

I would suggest that you use dedicated timer processes for as many things as you can - dialog, tm etc. see the module docs for how to do this.

-Eric

On 02/22/2016 10:28 AM, Rodrigo Pimenta Carvalho wrote:


Hi.

The log of my OpenSIPS began to present thousands of warnings similar to:



"WARNING:core:timer_ticker: timer task <nh-timer> already schedualed for 93991120 ms (now 248157560 ms), it may ove rlap.."


What does exactly means it?

Some discussions from the past said something about increasing the number in the global variable "children".


Should I change the number for children?  Before trying it i would like to hear something about, just to know better what I'm going to do.


Any hint will be very helpful!


Thanks a lot.



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



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





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





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





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





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





_______________________________________________
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/20160225/43087d1d/attachment-0001.htm>


More information about the Users mailing list