[OpenSIPS-Users] FW: Asynchronous operation for REST queries
Ramachandran, Agalya (Contractor)
Agalya_Ramachandran at comcast.com
Wed Sep 14 20:33:10 CEST 2016
Hi Liviu,
Thank you for the response.
If we configure connection_timeout as '2', then request will be sent out after 200ms. Am I right? Or your re-work will still reduce this value?
Are you going to add one more parameter "connect_polling_interval" and what will be use case of it?
Is it replacement for 10% wait time logic?
Also, I observed in the case of async call, it takes ~90 to 100ms to open the port itself. Is this expected behavior?
Because in synchronous case TCP port open is so quick within ~8 to 10ms.
Regards,
Agalya
From: Liviu Chircu [mailto:liviu at opensips.org]
Sent: Wednesday, September 14, 2016 4:33 AM
To: Ramachandran, Agalya (Contractor) <Agalya_Ramachandran at comcast.com>; OpenSIPS users mailling list <users at lists.opensips.org>
Subject: Re: FW:[OpenSIPS-Users] Asynchronous operation for REST queries
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:liviu at opensips.org]
Sent: Monday, September 12, 2016 4:06 AM
To: OpenSIPS users mailling list <users at lists.opensips.org><mailto:users at lists.opensips.org>; Ramachandran, Agalya (Contractor) <Agalya_Ramachandran at comcast.com><mailto:Agalya_Ramachandran at 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:liviu at opensips.org]
Sent: Thursday, September 08, 2016 7:05 AM
To: Ramachandran, Agalya (Contractor) <Agalya_Ramachandran at comcast.com><mailto:Agalya_Ramachandran at comcast.com>; Bogdan-Andrei Iancu <bogdan at opensips.org><mailto:bogdan at opensips.org>; OpenSIPS users mailling list <users at lists.opensips.org><mailto:users at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160914/db653f1b/attachment.htm>
More information about the Users
mailing list