<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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:12.0pt;
        font-family:"Calibri",sans-serif;}
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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        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>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Liviu,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thank you for the response and explanation, and for investigating the timing discrepancies. I must say though that this answer is very disappointing. We are not transferring large files or data sets during
 realtime call processing (I hope no one is!), so the transfer time is not really a concern; it is the connect time that can cause severe backlogs when the far end is not available, as in my test case. So as it stands the async functionality for rest_client
 is mostly useless to us as it doesn’t prevent the most common cause of congestion.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I can appreciate that libcurl does not provide access during the connect, but I guess my question would be why isn’t the entire operation run in async? Why must the connect be performed in the current process
 and only the transfer be in another process? My expectation when using any async function was that all execution of the underlying function called would be performed in a separate process, not that the function could pick and choose which parts would block
 and which would not.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Are other async function implementations similar to this? For example, does an async_db_query establish the DB connection in the current thread in blocking mode and only perform the actual query as async?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I would also recommend updating the documentation for both async and rest_client specifically to make this limitation clear, as it was not at all clear to us.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:black">Ben Newlin </span>
<span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:black">From: </span></b><span style="color:black">Users <users-bounces@lists.opensips.org> on behalf of Liviu Chircu <liviu@opensips.org><br>
<b>Reply-To: </b>OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Date: </b>Tuesday, June 25, 2019 at 8:52 AM<br>
<b>To: </b>"users@lists.opensips.org" <users@lists.opensips.org><br>
<b>Subject: </b>Re: [OpenSIPS-Users] Rest Client Async operation<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<p><tt><span style="font-size:10.0pt">Hi Ben,</span></tt><o:p></o:p></p>
<p><tt><span style="font-size:10.0pt">Regarding the "blocking rest_get()" problem: due to the specifics of the libcurl API, there is</span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
<tt>no direct access to the socket file descriptors during the initial TCP connect handshake.  Thus,</tt><br>
<tt>this phase will be synchronous (blocking), while all transfers (send HTTP req, receive reply) are</tt><br>
<tt>done asynchronously, regardless of how the data gets send or arrives (all at once, in chunks,</tt><br>
<tt>byte-by-byte, etc.).</tt></span><o:p></o:p></p>
<p><tt><span style="font-size:10.0pt">So, indeed: on the specific test case that the remote TCP endpoint is either unresponsive or it is</span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
<tt>blocked by a firewall, the throughput of your OpenSIPS may be significantly affected when talking HTTP</tt><br>
<tt>to such peers even if you perform async HTTP requests.  Maybe this is just my opinion, but I believe</tt><br>
<tt>that the average case is when the HTTP server/API is down and the TCP connect attempt will get rejected.</tt><br>
<tt>See [1] for more on this topic.</tt></span><o:p></o:p></p>
<p><tt><span style="font-size:10.0pt">Regarding the 5s vs. 8s timeouts, I will have to confirm the behavior first and get back to you.</span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
<tt>Async is heavily reliant on tm, so I wouldn't exclude the possibility that the transaction timeout</tt><br>
<tt>overrides, in some cases, the async logic's timeout.</tt></span><o:p></o:p></p>
<p><tt><span style="font-size:10.0pt">Best regards,</span></tt><o:p></o:p></p>
<p><tt><span style="font-size:10.0pt">[1]: <a href="https://serverfault.com/questions/521359/why-do-some-connections-time-out-and-others-get-refused">
https://serverfault.com/questions/521359/why-do-some-connections-time-out-and-others-get-refused</a></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 href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><o:p></o:p></pre>
<div>
<p class="MsoNormal">On 25.06.2019 00:33, Ben Newlin wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:11.0pt">Hello all,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">During testing I have found behavior that I cannot explain based on our current understanding of the operation of the async and rest_client functionality. I have reproduced this behavior with a fairly simple
 script configuration, the relevant piece of which is below:</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">children=8</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">loadmodule "rest_client.so"</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">modparam("rest_client", "connection_timeout", 5)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">modparam("rest_client", "connect_poll_interval", 1)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">modparam("rest_client", "curl_timeout", 5)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">route {</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">  xlog("L_ALERT", "before t_newtran()\r\n");</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">  t_newtran();</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">  xlog("L_ALERT", "after t_newtran()\r\n");</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">  async(rest_post(<a href="http://0.0.0.0">"http://0.0.0.0"</a>, "{}", "application/json", "$var(body)", "$var(ctype)", "$var(rcode)"),
 test_resume);</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">  xlog("L_ALERT", "after async\r\n");</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">}</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">route[test_resume] {</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">  xlog("L_ALERT", "test_resume: $retcode\r\n");</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">  t_reply("503", "Service Unavailable");</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">}</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The expected operation is to immediately trigger t_newtran() which sends a 100 response, then timeout on the rest_post call in 5 seconds and respond with a 503. For individual calls this does occur, although
 the timeout consistently takes several seconds too long, usually ~8s, as can be seen in the logs from the above code:</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 19:10:56 [337] before t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 19:10:56 [337] after t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 19:11:04 [337] ERROR:rest_client:start_async_http_req: connect timeout on
<a href="http://0.0.0.0">
http://0.0.0.0</a> (5s)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 19:11:04 [337] test_resume: -2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The extra time is troubling, but the bigger concern is that when I run multiple concurrent calls, I find that the 8 UDP children are still all blocking against the rest_post call. Here are the logs for that
 test:</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:51 [337] before t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:51 [337] after t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:51 [338] before t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:51 [338] after t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:51 [335] before t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:51 [335] after t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:51 [333] before t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:51 [333] after t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:52 [331] before t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:52 [331] after t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:52 [336] before t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:52 [336] after t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:52 [332] before t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:52 [332] after t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:52 [334] before t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:52 [334] after t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [337] ERROR:rest_client:start_async_http_req: connect timeout on
<a href="http://0.0.0.0">
http://0.0.0.0</a> (5s)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [337] test_resume: -2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [337] before t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [337] after t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [338] ERROR:rest_client:start_async_http_req: connect timeout on
<a href="http://0.0.0.0">
http://0.0.0.0</a> (5s)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [338] test_resume: -2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [338] before t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [338] after t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [335] ERROR:rest_client:start_async_http_req: connect timeout on
<a href="http://0.0.0.0">
http://0.0.0.0</a> (5s)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [335] test_resume: -2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [335] before t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [335] after t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [333] ERROR:rest_client:start_async_http_req: connect timeout on
<a href="http://0.0.0.0">
http://0.0.0.0</a> (5s)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [333] test_resume: -2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [333] before t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [333] after t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [331] ERROR:rest_client:start_async_http_req: connect timeout on
<a href="http://0.0.0.0">
http://0.0.0.0</a> (5s)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [331] test_resume: -2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [331] before t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [331] after t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [336] ERROR:rest_client:start_async_http_req: connect timeout on
<a href="http://0.0.0.0">
http://0.0.0.0</a> (5s)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [336] test_resume: -2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [336] before t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [336] after t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [332] ERROR:rest_client:start_async_http_req: connect timeout on
<a href="http://0.0.0.0">
http://0.0.0.0</a> (5s)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [332] test_resume: -2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [332] before t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:19:59 [332] after t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:00 [334] ERROR:rest_client:start_async_http_req: connect timeout on
<a href="http://0.0.0.0">
http://0.0.0.0</a> (5s)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:00 [334] test_resume: -2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:00 [334] before t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:00 [334] after t_newtran()</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:07 [337] ERROR:rest_client:start_async_http_req: connect timeout on
<a href="http://0.0.0.0">
http://0.0.0.0</a> (5s)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:07 [337] test_resume: -2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:07 [338] ERROR:rest_client:start_async_http_req: connect timeout on
<a href="http://0.0.0.0">
http://0.0.0.0</a> (5s)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:07 [338] test_resume: -2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:07 [335] ERROR:rest_client:start_async_http_req: connect timeout on
<a href="http://0.0.0.0">
http://0.0.0.0</a> (5s)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:07 [335] test_resume: -2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:07 [333] ERROR:rest_client:start_async_http_req: connect timeout on
<a href="http://0.0.0.0">
http://0.0.0.0</a> (5s)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:07 [333] test_resume: -2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:07 [331] ERROR:rest_client:start_async_http_req: connect timeout on
<a href="http://0.0.0.0">
http://0.0.0.0</a> (5s)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:07 [331] test_resume: -2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:07 [336] ERROR:rest_client:start_async_http_req: connect timeout on
<a href="http://0.0.0.0">
http://0.0.0.0</a> (5s)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:07 [336] test_resume: -2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:07 [332] ERROR:rest_client:start_async_http_req: connect timeout on
<a href="http://0.0.0.0">
http://0.0.0.0</a> (5s)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:07 [332] test_resume: -2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:07 [334] ERROR:rest_client:start_async_http_req: connect timeout on
<a href="http://0.0.0.0">
http://0.0.0.0</a> (5s)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Jun 24 21:20:07 [334] test_resume: -2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">You can clearly see that the first 8 Invites are processed immediately, but then no new messages are processed until the rest queries begin to timeout. As each query times out, freeing a child process, a new
 inbound request is processed. Clearly the message processing is being blocked on the rest queries, which is not supposed to happen when using async. Am I missing something in my configuration or am I not understanding how async is supposed to work somehow?</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:black">Ben Newlin </span>
<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Users mailing list<o:p></o:p></pre>
<pre><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><o:p></o:p></pre>
<pre><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></pre>
</blockquote>
</div>
</body>
</html>