<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi Royee,<br>
<br>
So, my primary suspicion on the save() points to the event routes
- to confirm this, you can use the benchmark module to log the
required time to execute those routes. And whenever you have an
alert on save(), you can correlate it with the execution time for
the event routes.<br>
<br>
On the t_relay() part, it may be more complicated, as the TM
module has a complex system of callbacks that are triggered
(inline) . And there are many modules using the TM callbacks , any
of them potentially delaying the t_relay() action. Another reason
may be DNS lookups, if your relaying is DNS based (and not IP
based).<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>
OpenSIPS Summit 2018
<a class="moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
<div class="moz-cite-prefix">On 02/06/2018 10:30 AM, Royee Tichauer
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFrVV=ztb+UhTqfe+5yz04ngNUdOtEefp=uMtCxaaUToNkY+HQ@mail.gmail.com">
<div dir="ltr">Thanks for lead Bogdan we will look into it.
<div><br>
</div>
<div>Do you also have any idea why the t_relay was blocking for
so long?</div>
<div><br>
</div>
<div>Royee</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Mon, Feb 5, 2018 at 7:23 PM Bogdan-Andrei
Iancu <<a href="mailto:bogdan@opensips.org"
moz-do-not-send="true">bogdan@opensips.org</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> <tt>Hi Royee,<br>
<br>
I don't think it is related to xmlrpc - there are separate
connection, separate processes for this.<br>
<br>
I would rather suspect the event routes - the event is
in-line handled in usrloc, so the save() will cover the
delivery/handling of the contact related events. And if
you do something time consuming in
event_route[E_UL_CONTACT_INSERT] lets say, this will
reflect as processing time for the save() function.<br>
<br>
Regards,<br>
</tt></div>
<div bgcolor="#FFFFFF" text="#000000">
<pre class="m_5444738107501424189moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="m_5444738107501424189moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
<a class="m_5444738107501424189moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam" target="_blank" moz-do-not-send="true">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
</div>
<div bgcolor="#FFFFFF" text="#000000">
<div class="m_5444738107501424189moz-cite-prefix">On
02/05/2018 06:44 PM, Royee Tichauer wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<p class="m_5444738107501424189inbox-inbox-p1"><span
class="m_5444738107501424189inbox-inbox-s1">Bogdan,</span></p>
<p class="m_5444738107501424189inbox-inbox-p1"><span
class="m_5444738107501424189inbox-inbox-s1">Not sure
I follow about breaking each function. What do you
mean by 'actual internal save()'?</span></p>
<p class="m_5444738107501424189inbox-inbox-p1"><span
class="m_5444738107501424189inbox-inbox-s1">DB
insert is not used.</span></p>
<p class="m_5444738107501424189inbox-inbox-p1"><span
class="m_5444738107501424189inbox-inbox-s1">We use:</span></p>
<p
class="m_5444738107501424189inbox-inbox-inbox-inbox-p1"><span
class="m_5444738107501424189inbox-inbox-inbox-inbox-s1">event_route</span><span
class="m_5444738107501424189inbox-inbox-inbox-inbox-s2">[</span><span
class="m_5444738107501424189inbox-inbox-inbox-inbox-s3">E_UL_CONTACT</span><span
class="m_5444738107501424189inbox-inbox-inbox-inbox-s2">_UPDATE]</span></p>
<p class="m_5444738107501424189inbox-inbox-p1"><span
class="m_5444738107501424189inbox-inbox-s1"></span></p>
<p
class="m_5444738107501424189inbox-inbox-inbox-inbox-p1"><span
class="m_5444738107501424189inbox-inbox-inbox-inbox-s1">event_route</span><span
class="m_5444738107501424189inbox-inbox-inbox-inbox-s2">[</span><span
class="m_5444738107501424189inbox-inbox-inbox-inbox-s3">E_UL_CONTACT</span><span
class="m_5444738107501424189inbox-inbox-inbox-inbox-s2">_DELETE]</span></p>
<p
class="m_5444738107501424189inbox-inbox-inbox-inbox-p1"><span
class="m_5444738107501424189inbox-inbox-inbox-inbox-s2"><span
class="m_5444738107501424189inbox-inbox-inbox-inbox-inbox-inbox-s1">event_route</span><span
class="m_5444738107501424189inbox-inbox-inbox-inbox-inbox-inbox-s2">[</span><span
class="m_5444738107501424189inbox-inbox-inbox-inbox-inbox-inbox-s3">E_UL_CONTACT</span><span
class="m_5444738107501424189inbox-inbox-inbox-inbox-inbox-inbox-s2">_INSERT]</span><span
class="m_5444738107501424189inbox-inbox-inbox-inbox-inbox-inbox-s1"> </span></span></p>
<p
class="m_5444738107501424189inbox-inbox-inbox-inbox-p1">btw,
we also use the mi_xmlrpc_ng constantly for monitoring
if that might have something to do with it (I saw a
comment on opensips 1.6 that there was an opensips
blocking issue in some cases).</p>
<p
class="m_5444738107501424189inbox-inbox-inbox-inbox-p1">Royee</p>
<p class="m_5444738107501424189inbox-inbox-p1"><br>
</p>
<p class="m_5444738107501424189inbox-inbox-p4"><span
class="m_5444738107501424189inbox-inbox-s1"></span></p>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Mon, Feb 5, 2018 at 6:34 PM
Bogdan-Andrei Iancu <<a
href="mailto:bogdan@opensips.org" target="_blank"
moz-do-not-send="true">bogdan@opensips.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> <tt>Hi Royee,<br>
<br>
Well, you need to break for each function the
possible types of actions. Like for save():<br>
- actual internal save()<br>
- DB insert if realtime mode used<br>
- potential events triggering - do you use any
usrloc related events ?<br>
<br>
Regards,<br>
<br>
</tt></div>
<div bgcolor="#FFFFFF" text="#000000">
<pre class="m_5444738107501424189m_6131680860225233737moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="m_5444738107501424189m_6131680860225233737moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
<a class="m_5444738107501424189m_6131680860225233737moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam" target="_blank" moz-do-not-send="true">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
</div>
<div bgcolor="#FFFFFF" text="#000000">
<div
class="m_5444738107501424189m_6131680860225233737moz-cite-prefix">On
02/05/2018 06:20 PM, Royee Tichauer wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi Bogdan, as the logs show:
<div><br>
<div><span style="font-size:13px">save -
8912725us</span></div>
<div><span style="font-size:13px">t_relay -
5355333us</span></div>
<div><span style="font-size:13px"><br>
</span></div>
<div><span style="font-size:13px">Let me know
if you have any ideas,</span></div>
<div><span style="font-size:13px">Thanks,</span></div>
<div><span style="font-size:13px">Royee</span></div>
<div><span style="font-size:13px"><br>
</span></div>
<div><br>
</div>
<div><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Mon, Feb 5, 2018 at 5:50
PM Bogdan-Andrei Iancu <<a
href="mailto:bogdan@opensips.org"
target="_blank" moz-do-not-send="true">bogdan@opensips.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px
#ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> <tt>Hi
Royee,<br>
<br>
what are the time values reported for
't_relay' and 'save' ? the 50ms
threashold may not be so relevant for
explaining delays of seconds. <br>
<br>
Best regards,<br>
</tt>
<pre class="m_5444738107501424189m_6131680860225233737m_5607116917498711912m_-3685039611660924341moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="m_5444738107501424189m_6131680860225233737m_5607116917498711912m_-3685039611660924341moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
<a class="m_5444738107501424189m_6131680860225233737m_5607116917498711912m_-3685039611660924341moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam" target="_blank" moz-do-not-send="true">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
</div>
<div bgcolor="#FFFFFF" text="#000000">
<div
class="m_5444738107501424189m_6131680860225233737m_5607116917498711912m_-3685039611660924341moz-cite-prefix">On
02/05/2018 02:09 PM, Royee Tichauer
via Users wrote:<br>
</div>
</div>
<div bgcolor="#FFFFFF" text="#000000">
<blockquote type="cite">
<div dir="ltr">Hi,
<div><br>
</div>
<div>We are using opensips 2.1 as an
SBC component and we see that we
have loss of registrations
happening once in a while. When we
captured SIP we saw that some
messages are being delayed by a
couple of seconds. We enabled
'exec_execute_message=50000' and
saw in the logs that opensips core
methods like 't_realy' and 'save'
. I looked at SAR during this time
and there are no indications of
CPU running high during this
time. </div>
<div><br>
</div>
<div>Can you help me figure out this
issue?<br>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Royee</div>
<div><br>
</div>
<div>Logs:</div>
<br>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>