<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><tt><tt>If you notice that log, then t<tt>he transfer was
complete<tt>d <tt>together with the TCP connect operation<tt>,
an ideal situation</tt><tt></tt><tt>! There is no nee<tt>d
to call <tt>the resume functi<tt>on anymore, since
<tt>we already have all the data. <tt>As soon
as we return ASYNC_SYNC, the resume<tt>_route
<tt>will be called.</tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></p>
<p><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt><tt>What
do you mean by "most of the call
fail<tt>s"<tt>? Are you missing any
data<tt><tt>?</tt><tt></tt></tt></tt></tt></tt><br>
</tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></tt></p>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS 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 13.09.2016 21:56, Ramachandran,
Agalya (Contractor) wrote:<br>
</div>
<blockquote
cite="mid:2a67d46ebc7b463fbffdcd8a634ac8fc@COPDCEX28.cable.comcast.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New",serif;
        color:black;}
tt
        {mso-style-priority:99;
        font-family:"Courier New",serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle24
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle25
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle26
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle27
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle28
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle29
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle30
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle31
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle32
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle33
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle34
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle35
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:blue">Hi Liviu, <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue">One more
observance. Am trying to load test on the main branch where
you have provided your fix.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Am using REST API
as, async. After receiving the response for the HTTP
request, I will process the incoming SIP INVITE.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue">If am sending 50
calls at 2 calls per sec from sipp, -in this case it works
perfectly fine.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">If am sending 50
calls at 5 calls per sec from sipp, most of the call fails.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue">If I look at logs
I could able to see that for failure case, it hits
start_async_http_req, but never resume function is called.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">It is printing </span><span
style="color:red">LM_DBG("done, no need for async!\n"); and
returns ASYNC_SYNC;</span><span style="color:blue"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Any idea why for
few calls, it is not acting as async? Particularly if I
increase cps, am seeing this behavior.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Please let me know
if am missing something.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Regards,<br>
Agalya<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span
style="color:windowtext">
<a class="moz-txt-link-abbreviated" href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a>
[<a class="moz-txt-link-freetext" href="mailto:users-bounces@lists.opensips.org">mailto:users-bounces@lists.opensips.org</a>]
<b>On Behalf Of </b>Ramachandran, Agalya (Contractor)<br>
<b>Sent:</b> Tuesday, September 13, 2016 2:14 PM<br>
<b>To:</b> Liviu Chircu <a class="moz-txt-link-rfc2396E" href="mailto:liviu@opensips.org"><liviu@opensips.org></a>;
OpenSIPS users mailling list
<a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a><br>
<b>Subject:</b> Re: [OpenSIPS-Users] FW: Asynchronous
operation for REST queries<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:blue">Hi Liviu, <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue">I have configured
“Connection_timeout” value as ‘1’ and ran 2 sipp calls.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">After TCP port is
opened, HTTP request is sent out approx. 95 to 100ms later.
Am attaching the log of the opensips by enabling debugging
log.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue">I took the code
from master branch and tested it out. If you find everything
OK let me know.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Or if you feel to
test any specific scenario please update me, so that I can
test and share you the results.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue">P.S:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">One more
observance.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">In the case of
synchronous, TCP port is opened within 8 ms, whereas in the
case of async TCP port is opening after 100 ms.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Is it the expected
behavior?. <o:p>
</o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue">What will be
expected time to give this fix in a branch version?
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Log file ~70 MB if
I enable the debug calls for single call and couldn’t post
you that log, since it says limit for email is 40 MB.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Regards,<br>
Agalya<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span
style="color:windowtext"> Liviu Chircu [<a
moz-do-not-send="true"
href="mailto:liviu@opensips.org">mailto:liviu@opensips.org</a>]
<br>
<b>Sent:</b> Monday, September 12, 2016 4:06 AM<br>
<b>To:</b> OpenSIPS users mailling list <<a
moz-do-not-send="true"
href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>>;
Ramachandran, Agalya (Contractor) <<a
moz-do-not-send="true"
href="mailto:Agalya_Ramachandran@comcast.com">Agalya_Ramachandran@comcast.com</a>><br>
<b>Subject:</b> Re: FW:[OpenSIPS-Users] Asynchronous
operation for REST queries<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p><tt><span style="font-size:10.0pt">Hi Agalya,</span></tt><o:p></o:p></p>
<p><tt><span style="font-size:10.0pt">The "connection_timeout"
is a configurable module parameter, so tuning it properly
might just solve your problem.</span></tt><o:p></o:p></p>
<p><tt><span style="font-size:10.0pt">If you need more
assistance, please enable debug logging (log_level = 4),
run the query and post the full log output.</span></tt><o:p></o:p></p>
<p><tt><span style="font-size:10.0pt">Best regards,</span></tt><o:p></o:p></p>
<pre>Liviu Chircu<o:p></o:p></pre>
<pre>OpenSIPS Developer<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><o:p></o:p></pre>
<div>
<p class="MsoNormal">On 09.09.2016 23:04, Ramachandran, Agalya
(Contractor) wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:blue">Hi Liviu, </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">I have tested
the patch. Now I see the delay is 2 secs. i.e after 2 secs
it sends the HTTP request out.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">I suspect this
2000 ms delay is due to the below field:</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red">long
connection_timeout = 20; </span>
<o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Can we reduce
this field to 5 or 10, so that it waits only half a second
or second to send the request out.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Let me know your
thoughts on this. </span>
<o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Am seeing the
below message in logs. Is everything working as you
expected?</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:red">rest_client:start_async_http_req:
libcurl TCP connect: we should wait up to 1ms
(timeout=20000ms)!</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Regards,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:blue">Agalya</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span
style="color:windowtext"> Liviu Chircu [<a
moz-do-not-send="true"
href="mailto:liviu@opensips.org">mailto:liviu@opensips.org</a>]
<br>
<b>Sent:</b> Thursday, September 08, 2016 7:05 AM<br>
<b>To:</b> Ramachandran, Agalya (Contractor) <a
moz-do-not-send="true"
href="mailto:Agalya_Ramachandran@comcast.com">
<Agalya_Ramachandran@comcast.com></a>;
Bogdan-Andrei Iancu <a moz-do-not-send="true"
href="mailto:bogdan@opensips.org">
<bogdan@opensips.org></a>; OpenSIPS users
mailling list <a moz-do-not-send="true"
href="mailto:users@lists.opensips.org">
<users@lists.opensips.org></a><br>
<b>Subject:</b> Re: FW:[OpenSIPS-Users] Asynchronous
operation for REST queries</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p><tt><span style="font-size:10.0pt">Hi, Agalya!</span></tt><o:p></o:p></p>
<p><tt><span style="font-size:10.0pt">Regarding the 10s delay
problem, a fix was pushed to the development branch [1].
If you are running on 2.1.4 git branch, could you please
pull the latest changes (git pull --rebase), and test it
out? You can import it with:</span></tt><o:p></o:p></p>
<p><tt><span style="font-size:10.0pt">git cherry-pick -x
66c337cc</span></tt><o:p></o:p></p>
<p><tt><span style="font-size:10.0pt">[1]: <a
moz-do-not-send="true"
href="https://github.com/OpenSIPS/opensips/commit/66c337cc89a2b5c3e1bbd78c289371efcda21886">https://github.com/OpenSIPS/opensips/commit/66c337cc89a2b5c3e1bbd78c289371efcda21886</a></span></tt><o:p></o:p></p>
<p><tt><span style="font-size:10.0pt">Best regards,</span></tt><o:p></o:p></p>
<pre>Liviu Chircu<o:p></o:p></pre>
<pre>OpenSIPS Developer<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><o:p></o:p></pre>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>