<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi,<br>
<br>
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.<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 24.02.2016 14:00, Rodrigo Pimenta
Carvalho wrote:<br>
</div>
<blockquote
cite="mid:BY2PR02MB1655F080EF293DD792F9704FB5A50@BY2PR02MB1655.namprd02.prod.outlook.com"
type="cite">
<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>
<div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Ok Bogdan and Eric.</p>
<p><br>
</p>
<p>In my system generally I have just 5 online accounts (we are
still developing the our project) and my nathelper
configuration is:</p>
<p><br>
</p>
<p><i>#### NAT modules <br>
loadmodule "nathelper.so" <br>
modparam("nathelper", "natping_interval", 10)<br>
modparam("nathelper", "ping_nated_only", 1)<br>
modparam("nathelper", "received_avp", "$avp(received_nh)")</i></p>
<p><br>
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.</p>
<p><br>
</p>
<p>By the way, maybe the SQL queries in my opensips.cfg is
causing the problem. For example, I have queries like this:</p>
<p><br>
</p>
<p> 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)");<br>
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)");<br>
<br>
</p>
<p>I was thinking whether this complex queries is taken much
time to be executed.</p>
<p><br>
</p>
<p>Is avp_db_query synchronous or asynchronous?</p>
<p><br>
</p>
<p>Regards.</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"
face="Calibri, sans-serif" color="#000000"><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
Bogdan-Andrei Iancu <a class="moz-txt-link-rfc2396E" href="mailto:bogdan@opensips.org"><bogdan@opensips.org></a><br>
<b>Enviado:</b> terça-feira, 23 de fevereiro de 2016 19:22<br>
<b>Para:</b> OpenSIPS users mailling list<br>
<b>Assunto:</b> Re: [OpenSIPS-Users] What does exactally
mean lots of warnings about timer_ticker in the log
(OpenSIPS 2.1)?</font>
<div> </div>
</div>
<div><tt>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.<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" id="LPlnk450604" 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_14563142359250.2226147058994118">
<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_14563142359210.7167962983791332"
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_14563142359220.5152466440033907">
<div style="background-color: rgb(255, 255, 255);
height: 38px; position: relative; margin: auto;
display: table; width: 116px;"
id="LPImageContainer_14563142359220.679541371717333">
<a moz-do-not-send="true" target="_blank"
href="http://www.opensips-solutions.com/"
style="display: table-cell; text-align:
center;"
id="LPImageAnchor_14563142359230.2634575281638648"><img
moz-do-not-send="true" 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: 38px; width:
116px; border-width: 0px; vertical-align:
bottom;"
src="http://www.opensips-solutions.com/imgs/opensips-solutions-logo.gif"
height="38" width="116"></a></div>
</td>
<td colspan="2" style="vertical-align: top;
position: relative; padding: 0px; display:
table-cell;"
id="TextCell_14563142359230.3782223378730064">
<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_14563142359230.8656220243259245">
<a moz-do-not-send="true" target="_blank"
href="http://www.opensips-solutions.com/"
style="text-decoration: none;"
id="LPUrlAnchor_14563142359240.6301797142241782">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_14563142359240.9767962232914151">
<a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></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_14563142359250.03497649947568393">
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 23.02.2016 23:22, Eric Tamme
wrote:<br>
</div>
<blockquote type="cite">Hey again Rodrigo,<br>
<br>
I had further discussions with Bogdan which I will
summarize here in an attempt to clarify.<br>
<br>
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.
<br>
<br>
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.<br>
<br>
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.
<br>
<br>
I would bring the question to either IRC, or to the devel
list with as much detail as possible.<br>
<br>
-Eric<br>
<br>
<br>
<div class="moz-cite-prefix">On 02/23/2016 01:59 PM,
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>Ok Eric.</p>
<p><br>
</p>
<p>Thank you very much.</p>
<p>I will analyze my OpenSIPS configuration and try to
discover what action is causing the block situation.</p>
<p><br>
</p>
<p>Best regards.<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" face="Calibri,
sans-serif" color="#000000"><b>De:</b>
<a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:users-bounces@lists.opensips.org">
users-bounces@lists.opensips.org</a> <a
moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:users-bounces@lists.opensips.org">
<a class="moz-txt-link-rfc2396E" href="mailto:users-bounces@lists.opensips.org"><users-bounces@lists.opensips.org></a></a>
em nome de Eric Tamme <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:eric@uphreak.com">
<eric@uphreak.com></a><br>
<b>Enviado:</b> terça-feira, 23 de fevereiro de
2016 17:51<br>
<b>Para:</b> OpenSIPS users mailling list<br>
<b>Assunto:</b> Re: [OpenSIPS-Users] What does
exactally mean lots of warnings about
timer_ticker in the log (OpenSIPS 2.1)?</font>
<div> </div>
</div>
<div>I was just speaking with bogdan, apparently i
am wrong. he said:<br>
<br>
"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)"<br>
<br>
So ... i guess you need to prevent any type of
blocking operations ...<br>
<br>
-Eric<br>
<br>
<div class="moz-cite-prefix">On 02/23/2016 01:34
PM, 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>Ok Eric.</p>
<p>Thank you. I will try this and see what
will be the result.</p>
<p>Thanks a lot.<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" face="Calibri,
sans-serif" color="#000000"><b>De:</b>
<a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:users-bounces@lists.opensips.org">
</a><a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a>
<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:users-bounces@lists.opensips.org"><users-bounces@lists.opensips.org></a>
em nome de Eric Tamme
<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:eric@uphreak.com"><eric@uphreak.com></a><br>
<b>Enviado:</b> terça-feira, 23 de
fevereiro de 2016 17:23<br>
<b>Para:</b> OpenSIPS users mailling
list<br>
<b>Assunto:</b> Re: [OpenSIPS-Users]
What does exactally mean lots of
warnings about timer_ticker in the log
(OpenSIPS 2.1)?</font>
<div> </div>
</div>
<div>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:
<a moz-do-not-send="true" id="LPlnk692062"
class="moz-txt-link-freetext"
href="http://www.opensips.org/html/docs/modules/2.1.x/tm.html#id294483">
http://www.opensips.org/html/docs/modules/2.1.x/tm.html#id294483</a>
<div
id="LPBorder_GT_14562595805430.15138348065131702"
style="margin-bottom:20px;
overflow:auto; width:100%;
text-indent:0px" contenteditable="false">
<table
id="LPContainer_14562595805410.12515299293791438"
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="2"
id="TextCell_14562595805420.6080462486927993"
style="vertical-align:top;
padding:0px; display:table-cell">
<div
id="LPTitle_14562595805420.9404760863612148"
style=""><a
moz-do-not-send="true"
target="_blank"
href="http://www.opensips.org/html/docs/modules/2.1.x/tm.html#id294483"
id="LPUrlAnchor_14562595805420.7574825171047826"
style="text-decoration:none">tm
Module - OpenSIPS</a></div>
<div
id="LPMetadata_14562595805430.4301729872693454"
style=""><a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="http://www.opensips.org"><a class="moz-txt-link-abbreviated" href="http://www.opensips.org">www.opensips.org</a></a></div>
<div
id="LPDescription_14562595805430.8212718479143748"
style="">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 ...</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
-Eric<br>
<br>
<div class="moz-cite-prefix">On 02/23/2016
12:57 PM, 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 <font style="font-size:11pt"
face="Calibri, sans-serif"
color="#000000">Eric Tamme</font>.</p>
<p><br>
</p>
<p>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.</p>
<p>Do you know what part of the
documentation tells about "dedicated
timer processes"?</p>
<p><br>
</p>
<p>BTW, my project is embedded.<br>
</p>
<p><br>
</p>
<p>Any hint will be very helpful!</p>
<p><br>
</p>
<p>Thanks a lot!<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"
face="Calibri, sans-serif"
color="#000000"><b>De:</b>
<a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:users-bounces@lists.opensips.org">
</a><a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a>
<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:users-bounces@lists.opensips.org"><users-bounces@lists.opensips.org></a>
em nome de Eric Tamme
<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:eric@uphreak.com"><eric@uphreak.com></a><br>
<b>Enviado:</b> segunda-feira,
22 de fevereiro de 2016 14:35<br>
<b>Para:</b> OpenSIPS users
mailling list<br>
<b>Assunto:</b> Re:
[OpenSIPS-Users] What does
exactally mean lots of warnings
about timer_ticker in the log
(OpenSIPS 2.1)?</font>
<div> </div>
</div>
<div>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.<br>
<br>
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.<br>
<br>
-Eric<br>
<br>
<div class="moz-cite-prefix">On
02/22/2016 10:28 AM, 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><br>
</p>
<p>Hi.</p>
<p>The log of my OpenSIPS
began to present thousands
of warnings similar to:<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>"WARNING:core:timer_ticker:
timer task <nh-timer>
already schedualed for
93991120 ms (now 248157560
ms), it may ove rlap.."</p>
<p><br>
</p>
<p>What does exactly means it?</p>
<p>Some discussions from the
past said something about
increasing the number in the
global variable "children".</p>
<p><br>
</p>
<p>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.<br>
</p>
<p><br>
</p>
<p>Any hint will be very
helpful!</p>
<p><br>
</p>
<p>Thanks a lot.<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>
</div>
<br>
<fieldset
class="mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
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>
</body>
</html>