Thank you for the logs, this is what I was looking for:

Sep 12 19:39:34 sturn-test /usr/local/sbin/opensips[23877]: DBG:rest_client:start_async_http_req: libcurl TCP connect: we should wait up to 977ms (timeout=1000ms)! Sep 12 19:39:34 sturn-test /usr/local/sbin/opensips[23877]: DBG:rest_client:start_async_http_req: busy waiting 98ms ...

So libcurl tells us we should wait, at most, 1 second before we can proceed with the transfer. The logic I added on the dev branch only waits 10% of this interval (98ms), but it's obviously way too much, since the connection is up within 8ms.

I will rework this 10% logic into a "connect_polling_interval" (milliseconds) module parameter, so you can customize it according to your environment and start your transfers a lot faster.

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 13.09.2016 21:14, Ramachandran, Agalya (Contractor) wrote:

Hi Liviu,

I have configured “Connection_timeout” value as ‘1’ and ran 2 sipp calls.

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.

I took the code from master branch and tested it out. If you find everything OK let me know.

Or if you feel to test any specific scenario please update me, so that I can test and share you the results.

P.S:

One more observance.

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.

Is it the expected behavior?.

What will be expected time to give this fix in a branch version?

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.

Regards,
Agalya

*From:*Liviu Chircu [mailto:li...@opensips.org]
*Sent:* Monday, September 12, 2016 4:06 AM
*To:* OpenSIPS users mailling list <users@lists.opensips.org>; Ramachandran, Agalya (Contractor) <agalya_ramachand...@comcast.com>
*Subject:* Re: FW:[OpenSIPS-Users] Asynchronous operation for REST queries

Hi Agalya,

The "connection_timeout" is a configurable module parameter, so tuning it properly might just solve your problem.

If you need more assistance, please enable debug logging (log_level = 4), run the query and post the full log output.

Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 09.09.2016 23:04, Ramachandran, Agalya (Contractor) wrote:

    Hi Liviu,

    I have tested the patch. Now I see the delay is 2 secs. i.e after
    2 secs it sends the HTTP request out.

    I suspect this 2000 ms delay is due to the below field:

    long connection_timeout = 20;

    Can we reduce this field to 5 or 10, so that it waits only half a
    second or second to send the request out.

    Let me know your thoughts on this.

    Am seeing the below message in logs. Is everything working as you
    expected?

    rest_client:start_async_http_req: libcurl TCP connect: we should
    wait up to 1ms (timeout=20000ms)!

    Regards,

    Agalya

    *From:*Liviu Chircu [mailto:li...@opensips.org]
    *Sent:* Thursday, September 08, 2016 7:05 AM
    *To:* Ramachandran, Agalya (Contractor)
    <agalya_ramachand...@comcast.com>
    <mailto:agalya_ramachand...@comcast.com>; Bogdan-Andrei Iancu
    <bog...@opensips.org> <mailto:bog...@opensips.org>; OpenSIPS users
    mailling list <users@lists.opensips.org>
    <mailto:users@lists.opensips.org>
    *Subject:* Re: FW:[OpenSIPS-Users] Asynchronous operation for REST
    queries

    Hi, Agalya!

    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:

    git cherry-pick -x 66c337cc

    [1]:
    
https://github.com/OpenSIPS/opensips/commit/66c337cc89a2b5c3e1bbd78c289371efcda21886

    Best regards,

    Liviu Chircu

    OpenSIPS Developer

    http://www.opensips-solutions.com


_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to