Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-10-07 Thread Bogdan-Andrei Iancu

Hi Agalya,

Fixes are pushed also in minor releases. So all the fixes done in trunk 
will also be part of the 2.2.2 minor release.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 03.10.2016 22:08, Ramachandran, Agalya (Contractor) wrote:


Hi team,

I see the latest tag release was on July 2016.

Is there any new tag release planned in near future with the fixes 
done in the dev branch?


Regards,

Agalya

*From:*users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] *On Behalf Of *Bogdan-Andrei 
Iancu

*Sent:* Monday, September 26, 2016 5:58 AM
*To:* OpenSIPS users mailling list ; Liviu 
Chircu 
*Subject:* Re: [OpenSIPS-Users] FW: Asynchronous operation for REST 
queries


Hi Agalya,

From the GIT history, there are 2 commits (in this order):

https://github.com/OpenSIPS/opensips/commit/f5abfb3dee649a14ae39ad74d7f04454f815748f
and
https://github.com/OpenSIPS/opensips/commit/3ba7be6692c6987faecb9c4c904035d5e7c0f916

with the corresponding patch files:


https://github.com/OpenSIPS/opensips/commit/f5abfb3dee649a14ae39ad74d7f04454f815748f.patch
and
https://github.com/OpenSIPS/opensips/commit/3ba7be6692c6987faecb9c4c904035d5e7c0f916.patch

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 23.09.2016 23:52, Ramachandran, Agalya (Contractor) wrote:

Hi Liviu,

I have tested the code from the dev branch. Now am not seeing any
delay in sending the request.

It is quick now. Thank you so much for the fix.

Can you give me a patch for this fix, so that I can apply that in
my version and that doesn’t hold me till you push the changes on
git hub.?

Regards,

Agalya

*From:*Liviu Chircu [mailto:li...@opensips.org]
*Sent:* Tuesday, September 20, 2016 12:24 PM
*To:* Ramachandran, Agalya (Contractor)

<mailto:agalya_ramachand...@comcast.com>; OpenSIPS users mailling
list  <mailto:users@lists.opensips.org>
*Subject:* Re: FW:[OpenSIPS-Users] Asynchronous operation for REST
queries

Hi Agalya,

2) has been pushed to master. As soon as we test it up a bit, I
will have it backported, as it's the complete fix.

Liviu Chircu

OpenSIPS Developer

http://www.opensips-solutions.com

On 20.09.2016 16:57, Ramachandran, Agalya (Contractor) wrote:

Hi Liviu,

It would be great if we know tentative time for the below one’s.

1)Fix that you have committed in dev branch with regard to the
10sec delay to 2.1.4 or to any stable release?

2)Feature addition for “connect_polling_interval” ?

Regards,

Agalya

*From:*Liviu Chircu [mailto:li...@opensips.org]
*Sent:* Thursday, September 15, 2016 3:53 AM
*To:* Ramachandran, Agalya (Contractor)

<mailto:agalya_ramachand...@comcast.com>; OpenSIPS users
mailling list 
<mailto:users@lists.opensips.org>
*Subject:* Re: FW:[OpenSIPS-Users] Asynchronous operation for
REST queries

On 14.09.2016 21:33, Ramachandran, Agalya (Contractor) wrote:

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?

Yes.



Also, I observed in the case of async call, it takes ~90
to 100ms to open the port itself. Is this expected behavior?

Yes.




Liviu Chircu

OpenSIPS Developer

http://www.opensips-solutions.com




___

Users mailing list

Users@lists.opensips.org <mailto:Users@lists.opensips.org>

http://lists.opensips.org/cgi-bin/mailman/listinfo/users



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


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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-10-04 Thread Bogdan-Andrei Iancu

Hi Agalya,

I'm not fully aware of your script, but you can definitely do more than 
that - without any sync queries, you can easily get 20K cps on such a 
machine.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 03.10.2016 22:06, Ramachandran, Agalya (Contractor) wrote:

Hi Liviu/Bogdan,
Please let me know how is my OpenSIPS performance? Is it under 
performed ?

Waiting for the feedback to hear from you.
Am running OpenSIPS in a VM with 8 core CPU and 20GB RAM.
Regards,
Agalya
_
*From:* Ramachandran, Agalya (Contractor)
*Sent:* Monday, September 19, 2016 12:56 PM
*To:* 'Liviu Chircu' ; OpenSIPS users mailling 
list 

*Subject:* RE: FW:[OpenSIPS-Users] Asynchronous operation for REST queries
Hi Liviu,
Thank you for the response.
2) Regarding the feedback, this is what I observed till now.

 1. Without HTTP –150 calls per sec for almost 100K calls => Looks good.
 2. With HTTP being sync –

 1. Children parameter =1 , only 4 cps, since depending on the query
and the response, it takes time to respond.
 2. Children parameter = 50, 100K calls sent at 100 cps => OpenSIPS
handles  95cps - 3000+ active calls
 3. Children parameter = 20, 100K calls sent at 35 cps => OpenSIPS
handles  35cps

 3. With HTTP being async tested with the latest fix included on main
branch

=>   Children parameter =8, 10K calls sent at 25cps => OpenSIPS 
handles  23 cps, with 1200+ active calls.
The result with async may improve in a release version from the 
development branch I hope.

Regards,
Agalya
*From:* Liviu Chircu [_mailto:liviu@opensips.org_]
*Sent:* Monday, September 19, 2016 11:18 AM
*To:* Ramachandran, Agalya (Contractor) 
<_Agalya_Ramachandran@comcast.com_ 
>; OpenSIPS users mailling 
list <_users@lists.opensips.org_ >

*Subject:* Re: FW:[OpenSIPS-Users] Asynchronous operation for REST queries
Hi, Agalya!
1) Regarding connection reuse optimization, I haven't done any 
research on this topic. In other words, libcurl will be managing its 
connections through its default settings / parameters, whichever they 
are. The module is mature enough, maybe now is a good time to look 
into this feature.
2) Since you're doing lots of obviously blocking operations (HTTP 
transfers), then you will definitely need more processes. However, I 
noticed lots of transfers are quickly completed, without requiring 
async, so you don't want too many processes if all requests work like 
that. Just tune according to your needs until you find a sweet spot. 
You could even share the performance results, I'd love to hear some 
feedback.

Liviu Chircu
OpenSIPS Developer
_http://www.opensips-solutions.com_
On 19.09.2016 17:57, Ramachandran, Agalya (Contractor) wrote:
Hi team/Liviu,
Couple of  questions for clarification.

 1. I see for every HTTP request(for both sync and async), TCP ports
are being opened and closed.

 Are we not using same port and pooling the request in 
a particular port if we are hitting simultaneous requests?


 2. Children parameter in the config file - I understand the use case
of this is to spawn multiple threads.

If we want to handle more load in OpenSIPS, we should increase this 
number correct?
So when increasing this number of children process we should take care 
of CPU utilization and according to the no of CPU and RAM we used in 
our Linux system.

Correct me if am wrong in my understanding of the above questions.
Regards,
Agalya
*From:* Liviu Chircu [_mailto:liviu@opensips.org_]
*Sent:* Thursday, September 15, 2016 3:53 AM
*To:* Ramachandran, Agalya (Contractor) 
__ 
; OpenSIPS users mailling list 
__ 

*Subject:* Re: FW:[OpenSIPS-Users] Asynchronous operation for REST queries
On 14.09.2016 21:33, Ramachandran, Agalya (Contractor) wrote:
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?
Yes.

Also, I observed in the case of async call, it takes ~90 to 100ms to 
open the port itself. Is this expected behavior?

Yes.


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


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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-10-03 Thread Ramachandran, Agalya (Contractor)
Hi team,

I see the latest tag release was on July 2016.
Is there any new tag release planned in near future with the fixes done in the 
dev branch?

Regards,
Agalya

From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Monday, September 26, 2016 5:58 AM
To: OpenSIPS users mailling list ; Liviu Chircu 

Subject: Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

Hi Agalya,

>From the GIT history, there are 2 commits (in this order):

https://github.com/OpenSIPS/opensips/commit/f5abfb3dee649a14ae39ad74d7f04454f815748f
and
https://github.com/OpenSIPS/opensips/commit/3ba7be6692c6987faecb9c4c904035d5e7c0f916

with the corresponding patch files:


https://github.com/OpenSIPS/opensips/commit/f5abfb3dee649a14ae39ad74d7f04454f815748f.patch
and
https://github.com/OpenSIPS/opensips/commit/3ba7be6692c6987faecb9c4c904035d5e7c0f916.patch

Regards,


Bogdan-Andrei Iancu

OpenSIPS Founder and Developer

http://www.opensips-solutions.com
On 23.09.2016 23:52, Ramachandran, Agalya (Contractor) wrote:
Hi Liviu,

I have tested the code from the dev branch. Now am not seeing any delay in 
sending the request.
It is quick now. Thank you so much for the fix.
Can you give me a patch for this fix, so that I can apply that in my version 
and that doesn't hold me till you push the changes on git hub.?

Regards,
Agalya

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


Hi Agalya,

2) has been pushed to master. As soon as we test it up a bit, I will have it 
backported, as it's the complete fix.

Liviu Chircu

OpenSIPS Developer

http://www.opensips-solutions.com
On 20.09.2016 16:57, Ramachandran, Agalya (Contractor) wrote:
Hi Liviu,

It would be great if we know tentative time for the below one's.


1)  Fix that you have committed in dev branch with regard to the 10sec 
delay to 2.1.4 or to any stable release?

2)  Feature addition for "connect_polling_interval" ?

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


On 14.09.2016 21:33, Ramachandran, Agalya (Contractor) wrote:
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?
Yes.




Also, I observed in the case of async call, it takes ~90 to 100ms to open the 
port itself. Is this expected behavior?
Yes.





Liviu Chircu

OpenSIPS Developer

http://www.opensips-solutions.com





___

Users mailing list

Users@lists.opensips.org<mailto:Users@lists.opensips.org>

http://lists.opensips.org/cgi-bin/mailman/listinfo/users

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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-10-03 Thread Ramachandran, Agalya (Contractor)
Hi Liviu/Bogdan,

Please let me know how is my OpenSIPS performance? Is it under performed ?
Waiting for the feedback to hear from you.

Am running OpenSIPS in a VM with 8 core CPU and 20GB RAM.

Regards,
Agalya

_
From: Ramachandran, Agalya (Contractor)
Sent: Monday, September 19, 2016 12:56 PM
To: 'Liviu Chircu' ; OpenSIPS users mailling list 

Subject: RE: FW:[OpenSIPS-Users] Asynchronous operation for REST queries



Hi Liviu,
Thank you for the response.
2) Regarding the feedback, this is what I observed till now.
1.  Without HTTP -150 calls per sec for almost 100K calls => Looks good.
2.  With HTTP being sync -
a.  Children parameter =1 , only 4 cps, since depending on the query and 
the response, it takes time to respond.
b.  Children parameter = 50, 100K calls sent at 100 cps => OpenSIPS handles 
 95cps - 3000+ active calls
c.  Children parameter = 20, 100K calls sent at 35 cps => OpenSIPS handles  
35cps
3.  With HTTP being async tested with the latest fix included on main branch

  =>   Children parameter =8, 10K calls sent at 25cps => OpenSIPS handles  
23 cps, with 1200+ active calls.

The result with async may improve in a release version from the development 
branch I hope.
Regards,
Agalya
From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Monday, September 19, 2016 11:18 AM
To: Ramachandran, Agalya (Contractor) 
mailto:agalya_ramachand...@comcast.com>>; 
OpenSIPS users mailling list 
mailto:users@lists.opensips.org>>
Subject: Re: FW:[OpenSIPS-Users] Asynchronous operation for REST queries


Hi, Agalya!
1) Regarding connection reuse optimization, I haven't done any research on this 
topic. In other words, libcurl will be managing its connections through its 
default settings / parameters, whichever they are. The module is mature enough, 
maybe now is a good time to look into this feature.
2) Since you're doing lots of obviously blocking operations (HTTP transfers), 
then you will definitely need more processes. However, I noticed lots of 
transfers are quickly completed, without requiring async, so you don't want too 
many processes if all requests work like that. Just tune according to your 
needs until you find a sweet spot. You could even share the performance 
results, I'd love to hear some feedback.
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 19.09.2016 17:57, Ramachandran, Agalya (Contractor) wrote:
Hi team/Liviu,

Couple of  questions for clarification.
1)  I see for every HTTP request(for both sync and async), TCP ports are 
being opened and closed.
 Are we not using same port and pooling the request in a 
particular port if we are hitting simultaneous requests?
2)  Children parameter in the config file - I understand the use case of 
this is to spawn multiple threads.
  If we want to handle more load in OpenSIPS, we should increase this 
number correct?
  So when increasing this number of children process we should take care of 
CPU utilization and according to the no of CPU and RAM we used in our Linux 
system.

Correct me if am wrong in my understanding of the above questions.

Regards,
Agalya


From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Thursday, September 15, 2016 3:53 AM
To: Ramachandran, Agalya (Contractor) 
; 
OpenSIPS users mailling list 

Subject: Re: FW:[OpenSIPS-Users] Asynchronous operation for REST queries

On 14.09.2016 21:33, Ramachandran, Agalya (Contractor) wrote:
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?
Yes.



Also, I observed in the case of async call, it takes ~90 to 100ms to open the 
port itself. Is this expected behavior?
Yes.



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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-26 Thread Ramachandran, Agalya (Contractor)
Hi Bogdan,

Thank you. I will not be coming to work for next 3 days.
Once am in, I will include changes and let you know if I need any help.

Regards,
Agalya

From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Monday, September 26, 2016 5:58 AM
To: OpenSIPS users mailling list ; Liviu Chircu 

Subject: Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

Hi Agalya,

>From the GIT history, there are 2 commits (in this order):

https://github.com/OpenSIPS/opensips/commit/f5abfb3dee649a14ae39ad74d7f04454f815748f
and
https://github.com/OpenSIPS/opensips/commit/3ba7be6692c6987faecb9c4c904035d5e7c0f916

with the corresponding patch files:


https://github.com/OpenSIPS/opensips/commit/f5abfb3dee649a14ae39ad74d7f04454f815748f.patch
and
https://github.com/OpenSIPS/opensips/commit/3ba7be6692c6987faecb9c4c904035d5e7c0f916.patch

Regards,


Bogdan-Andrei Iancu

OpenSIPS Founder and Developer

http://www.opensips-solutions.com
On 23.09.2016 23:52, Ramachandran, Agalya (Contractor) wrote:
Hi Liviu,

I have tested the code from the dev branch. Now am not seeing any delay in 
sending the request.
It is quick now. Thank you so much for the fix.
Can you give me a patch for this fix, so that I can apply that in my version 
and that doesn't hold me till you push the changes on git hub.?

Regards,
Agalya

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


Hi Agalya,

2) has been pushed to master. As soon as we test it up a bit, I will have it 
backported, as it's the complete fix.

Liviu Chircu

OpenSIPS Developer

http://www.opensips-solutions.com
On 20.09.2016 16:57, Ramachandran, Agalya (Contractor) wrote:
Hi Liviu,

It would be great if we know tentative time for the below one's.


1)  Fix that you have committed in dev branch with regard to the 10sec 
delay to 2.1.4 or to any stable release?

2)  Feature addition for "connect_polling_interval" ?

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


On 14.09.2016 21:33, Ramachandran, Agalya (Contractor) wrote:
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?
Yes.




Also, I observed in the case of async call, it takes ~90 to 100ms to open the 
port itself. Is this expected behavior?
Yes.





Liviu Chircu

OpenSIPS Developer

http://www.opensips-solutions.com





___

Users mailing list

Users@lists.opensips.org<mailto:Users@lists.opensips.org>

http://lists.opensips.org/cgi-bin/mailman/listinfo/users

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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-26 Thread Bogdan-Andrei Iancu

Hi Agalya,


From the GIT history, there are 2 commits (in this order):


https://github.com/OpenSIPS/opensips/commit/f5abfb3dee649a14ae39ad74d7f04454f815748f
and
https://github.com/OpenSIPS/opensips/commit/3ba7be6692c6987faecb9c4c904035d5e7c0f916

with the corresponding patch files:


https://github.com/OpenSIPS/opensips/commit/f5abfb3dee649a14ae39ad74d7f04454f815748f.patch
and
https://github.com/OpenSIPS/opensips/commit/3ba7be6692c6987faecb9c4c904035d5e7c0f916.patch

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 23.09.2016 23:52, Ramachandran, Agalya (Contractor) wrote:


Hi Liviu,

I have tested the code from the dev branch. Now am not seeing any 
delay in sending the request.


It is quick now. Thank you so much for the fix.

Can you give me a patch for this fix, so that I can apply that in my 
version and that doesn’t hold me till you push the changes on git hub.?


Regards,

Agalya

*From:*Liviu Chircu [mailto:li...@opensips.org]
*Sent:* Tuesday, September 20, 2016 12:24 PM
*To:* Ramachandran, Agalya (Contractor) 
; OpenSIPS users mailling list 


*Subject:* Re: FW:[OpenSIPS-Users] Asynchronous operation for REST queries

Hi Agalya,

2) has been pushed to master. As soon as we test it up a bit, I will 
have it backported, as it's the complete fix.


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

On 20.09.2016 16:57, Ramachandran, Agalya (Contractor) wrote:

Hi Liviu,

It would be great if we know tentative time for the below one’s.

1)Fix that you have committed in dev branch with regard to the
10sec delay to 2.1.4 or to any stable release?

2)Feature addition for “connect_polling_interval” ?

Regards,

Agalya

*From:*Liviu Chircu [mailto:li...@opensips.org]
*Sent:* Thursday, September 15, 2016 3:53 AM
*To:* Ramachandran, Agalya (Contractor)

; OpenSIPS users mailling
list  
*Subject:* Re: FW:[OpenSIPS-Users] Asynchronous operation for REST
queries

On 14.09.2016 21:33, Ramachandran, Agalya (Contractor) wrote:

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?

Yes.


Also, I observed in the case of async call, it takes ~90 to
100ms to open the port itself. Is this expected behavior?

Yes.



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


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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-23 Thread Ramachandran, Agalya (Contractor)
Hi Liviu,

I have tested the code from the dev branch. Now am not seeing any delay in 
sending the request.
It is quick now. Thank you so much for the fix.
Can you give me a patch for this fix, so that I can apply that in my version 
and that doesn't hold me till you push the changes on git hub.?

Regards,
Agalya

From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Tuesday, September 20, 2016 12:24 PM
To: Ramachandran, Agalya (Contractor) ; 
OpenSIPS users mailling list 
Subject: Re: FW:[OpenSIPS-Users] Asynchronous operation for REST queries


Hi Agalya,

2) has been pushed to master. As soon as we test it up a bit, I will have it 
backported, as it's the complete fix.

Liviu Chircu

OpenSIPS Developer

http://www.opensips-solutions.com
On 20.09.2016 16:57, Ramachandran, Agalya (Contractor) wrote:
Hi Liviu,

It would be great if we know tentative time for the below one's.


1)  Fix that you have committed in dev branch with regard to the 10sec 
delay to 2.1.4 or to any stable release?

2)  Feature addition for "connect_polling_interval" ?

Regards,
Agalya
From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Thursday, September 15, 2016 3:53 AM
To: Ramachandran, Agalya (Contractor) 
; 
OpenSIPS users mailling list 

Subject: Re: FW:[OpenSIPS-Users] Asynchronous operation for REST queries


On 14.09.2016 21:33, Ramachandran, Agalya (Contractor) wrote:
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?
Yes.



Also, I observed in the case of async call, it takes ~90 to 100ms to open the 
port itself. Is this expected behavior?
Yes.




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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-20 Thread Ramachandran, Agalya (Contractor)
Ok Liviu. I will update my code base and will do test. Thank you so much for 
the update.

Regards,
Agalya

From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Tuesday, September 20, 2016 12:24 PM
To: Ramachandran, Agalya (Contractor) ; 
OpenSIPS users mailling list 
Subject: Re: FW:[OpenSIPS-Users] Asynchronous operation for REST queries


Hi Agalya,

2) has been pushed to master. As soon as we test it up a bit, I will have it 
backported, as it's the complete fix.

Liviu Chircu

OpenSIPS Developer

http://www.opensips-solutions.com
On 20.09.2016 16:57, Ramachandran, Agalya (Contractor) wrote:
Hi Liviu,

It would be great if we know tentative time for the below one's.


1)  Fix that you have committed in dev branch with regard to the 10sec 
delay to 2.1.4 or to any stable release?

2)  Feature addition for "connect_polling_interval" ?

Regards,
Agalya
From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Thursday, September 15, 2016 3:53 AM
To: Ramachandran, Agalya (Contractor) 
; 
OpenSIPS users mailling list 

Subject: Re: FW:[OpenSIPS-Users] Asynchronous operation for REST queries


On 14.09.2016 21:33, Ramachandran, Agalya (Contractor) wrote:
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?
Yes.



Also, I observed in the case of async call, it takes ~90 to 100ms to open the 
port itself. Is this expected behavior?
Yes.




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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-20 Thread Liviu Chircu

Hi Agalya,

2) has been pushed to master. Assoon as we test it up a bit, I will have 
it backported, as it's the complete fix.


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

On 20.09.2016 16:57, Ramachandran, Agalya (Contractor) wrote:


Hi Liviu,

It would be great if we know tentative time for the below one’s.

1)Fix that you have committed in dev branch with regard to the 10sec 
delay to 2.1.4 or to any stable release?


2)Feature addition for “connect_polling_interval” ?

Regards,

Agalya

*From:*Liviu Chircu [mailto:li...@opensips.org]
*Sent:* Thursday, September 15, 2016 3:53 AM
*To:* Ramachandran, Agalya (Contractor) 
; OpenSIPS users mailling list 


*Subject:* Re: FW:[OpenSIPS-Users] Asynchronous operation for REST queries

On 14.09.2016 21:33, Ramachandran, Agalya (Contractor) wrote:

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?

Yes.

Also, I observed in the case of async call, it takes ~90 to 100ms
to open the port itself. Is this expected behavior?

Yes.


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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-20 Thread Ramachandran, Agalya (Contractor)
Hi Liviu,

It would be great if we know tentative time for the below one's.


1)  Fix that you have committed in dev branch with regard to the 10sec 
delay to 2.1.4 or to any stable release?

2)  Feature addition for "connect_polling_interval" ?

Regards,
Agalya
From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Thursday, September 15, 2016 3:53 AM
To: Ramachandran, Agalya (Contractor) ; 
OpenSIPS users mailling list 
Subject: Re: FW:[OpenSIPS-Users] Asynchronous operation for REST queries


On 14.09.2016 21:33, Ramachandran, Agalya (Contractor) wrote:
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?
Yes.


Also, I observed in the case of async call, it takes ~90 to 100ms to open the 
port itself. Is this expected behavior?
Yes.



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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-19 Thread Ramachandran, Agalya (Contractor)
Hi Liviu,
Thank you for the response.
2) Regarding the feedback, this is what I observed till now.
1.  Without HTTP -150 calls per sec for almost 100K calls => Looks good.
2.  With HTTP being sync -
a.  Children parameter =1 , only 4 cps, since depending on the query and 
the response, it takes time to respond.
b.  Children parameter = 50, 100K calls sent at 100 cps => OpenSIPS handles 
 95cps - 3000+ active calls
c.  Children parameter = 20, 100K calls sent at 35 cps => OpenSIPS handles  
35cps
3.  With HTTP being async tested with the latest fix included on main branch

  =>   Children parameter =8, 10K calls sent at 25cps => OpenSIPS handles  
23 cps, with 1200+ active calls.

The result with async may improve in a release version from the development 
branch I hope.
Regards,
Agalya
From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Monday, September 19, 2016 11:18 AM
To: Ramachandran, Agalya (Contractor) ; 
OpenSIPS users mailling list 
Subject: Re: FW:[OpenSIPS-Users] Asynchronous operation for REST queries


Hi, Agalya!
1) Regarding connection reuse optimization, I haven't done any research on this 
topic. In other words, libcurl will be managing its connections through its 
default settings / parameters, whichever they are. The module is mature enough, 
maybe now is a good time to look into this feature.
2) Since you're doing lots of obviously blocking operations (HTTP transfers), 
then you will definitely need more processes. However, I noticed lots of 
transfers are quickly completed, without requiring async, so you don't want too 
many processes if all requests work like that. Just tune according to your 
needs until you find a sweet spot. You could even share the performance 
results, I'd love to hear some feedback.
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 19.09.2016 17:57, Ramachandran, Agalya (Contractor) wrote:
Hi team/Liviu,

Couple of  questions for clarification.
1)  I see for every HTTP request(for both sync and async), TCP ports are 
being opened and closed.
 Are we not using same port and pooling the request in a 
particular port if we are hitting simultaneous requests?
2)  Children parameter in the config file - I understand the use case of 
this is to spawn multiple threads.
  If we want to handle more load in OpenSIPS, we should increase this 
number correct?
  So when increasing this number of children process we should take care of 
CPU utilization and according to the no of CPU and RAM we used in our Linux 
system.

Correct me if am wrong in my understanding of the above questions.

Regards,
Agalya


From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Thursday, September 15, 2016 3:53 AM
To: Ramachandran, Agalya (Contractor) 
; 
OpenSIPS users mailling list 

Subject: Re: FW:[OpenSIPS-Users] Asynchronous operation for REST queries

On 14.09.2016 21:33, Ramachandran, Agalya (Contractor) wrote:
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?
Yes.



Also, I observed in the case of async call, it takes ~90 to 100ms to open the 
port itself. Is this expected behavior?
Yes.



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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-19 Thread Liviu Chircu

Hi, Agalya!

1) Regarding connection reuseoptimization,I haven't done any research on 
this topic. In other words, libcurl will be managing its connections 
through its default settings/ parameters, whichever they are. The module 
is mature enough, maybe now is a good time to lookinto thisfeature.


2) Since you're doing lots of obviously blocking operations (HTTP 
transfers), then you will definitely need more processes. However, I 
noticed lots of transfers are quickly completed, withoutrequiring async, 
so you don't want too many processes if all requests worklike that. Just 
tune according to your needs until you find a sweet spot. You could even 
share the performance results, I'd love to hear some feedback.


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

On 19.09.2016 17:57, Ramachandran, Agalya (Contractor) wrote:


Hi team/Liviu,

Couple of  questions for clarification.

1)I see for every HTTP request(for both sync and async), TCP ports are 
being opened and closed.


 Are we not using same port and pooling the request in 
a particular port if we are hitting simultaneous requests?


2)Children parameter in the config file - I understand the use case of 
this is to spawn multiple threads.


If we want to handle more load in OpenSIPS, we should increase this 
number correct?


So when increasing this number of children process we should take care 
of CPU utilization and according to the no of CPU and RAM we used in 
our Linux system.


Correct me if am wrong in my understanding of the above questions.

Regards,

Agalya

*From:*Liviu Chircu [mailto:li...@opensips.org]
*Sent:* Thursday, September 15, 2016 3:53 AM
*To:* Ramachandran, Agalya (Contractor) 
; OpenSIPS users mailling list 


*Subject:* Re: FW:[OpenSIPS-Users] Asynchronous operation for REST queries

On 14.09.2016 21:33, Ramachandran, Agalya (Contractor) wrote:

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?

Yes.

Also, I observed in the case of async call, it takes ~90 to 100ms
to open the port itself. Is this expected behavior?

Yes.


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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-19 Thread Ramachandran, Agalya (Contractor)
Hi team/Liviu,

Couple of  questions for clarification.

1)  I see for every HTTP request(for both sync and async), TCP ports are 
being opened and closed.
 Are we not using same port and pooling the request in a 
particular port if we are hitting simultaneous requests?

2)  Children parameter in the config file - I understand the use case of 
this is to spawn multiple threads.
If we want to handle more load in OpenSIPS, we should increase this number 
correct?
So when increasing this number of children process we should take care of CPU 
utilization and according to the no of CPU and RAM we used in our Linux system.

Correct me if am wrong in my understanding of the above questions.

Regards,
Agalya


From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Thursday, September 15, 2016 3:53 AM
To: Ramachandran, Agalya (Contractor) ; 
OpenSIPS users mailling list 
Subject: Re: FW:[OpenSIPS-Users] Asynchronous operation for REST queries


On 14.09.2016 21:33, Ramachandran, Agalya (Contractor) wrote:
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?
Yes.


Also, I observed in the case of async call, it takes ~90 to 100ms to open the 
port itself. Is this expected behavior?
Yes.



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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-15 Thread Ramachandran, Agalya (Contractor)
Hi Liviu,

Please let me know rough /tentative date when you can provide the patch?

Regards,
Agalya

From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Thursday, September 15, 2016 3:53 AM
To: Ramachandran, Agalya (Contractor) ; 
OpenSIPS users mailling list 
Subject: Re: FW:[OpenSIPS-Users] Asynchronous operation for REST queries


On 14.09.2016 21:33, Ramachandran, Agalya (Contractor) wrote:
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?
Yes.


Also, I observed in the case of async call, it takes ~90 to 100ms to open the 
port itself. Is this expected behavior?
Yes.



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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-15 Thread Ramachandran, Agalya (Contractor)
Hi Liviu,

Thank you. Even I found it after sending you the mail.

Regards,
Agalya

From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Thursday, September 15, 2016 3:55 AM
To: Ramachandran, Agalya (Contractor) ; 
OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries


In OpenSIPS script, you can obtain similar results to strtok() with the 
"s.select" string transformation [1].

[1]: http://www.opensips.org/Documentation/Script-Tran-2-3#toc6

Liviu Chircu

OpenSIPS Developer

http://www.opensips-solutions.com
On 14.09.2016 21:57, Ramachandran, Agalya (Contractor) wrote:
Hi Liviu,

I have tested by treating ASYNC_SYNC as success. Now calls are not failing.
When I tried to print the HTTP response which is available in $var(body), I 
could able to see the payload for HTTP response.
{"status":200,"hasErrors":false,"id":"b991f6c0-790f-11e6-82ef-05ba3d7a5...@test.comcast.net
 <mailto:b991f6c0-790f-11e6-82ef-05ba3d7a5...@test.comcast.net%20> 
","timestamp":1473975975,"messageId":0,"Token":"2de3dbv7823wxcas3fgf"}

I have a question here. When I receive the response in resume function I will 
do a strtok and extract the domain name "test.comcast.net".

If am not hitting resume function and it comes directly to resume_route, how 
the extraction of the domain from the response string can be achieved?
Because regular 'C' code and 'C' string library won't work with opensips config 
file.
Can you please share any documentation you have for extracting particular value 
from a sting in config file? I see the documentation to form a string but not 
vice versa.

Regards,
Agalya.

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


So you are doing the $rc < 0 check in the beginning of the resume_route? If 
yes, could you treat ASYNC_SYNC as a success (it actually is!), and see if your 
output variables are properly populated with the transferred data?

Liviu Chircu

OpenSIPS Developer

http://www.opensips-solutions.com
On 14.09.2016 18:58, Ramachandran, Agalya (Contractor) wrote:
Hi Liviu,

I understand this way.
When we are getting more calls in opensips, and  the TCP port is been open in 
that particular time window.
At that time when it tries to send HTTP request, start_async_http_req is 
called, since is the port is already open, it is assuming that async is 
completed.
Am I right?

most of the call fails - meaning that for first 15 to 20 calls call is 
successful from end to end.
After that for the rest of the calls, it fails because ASYNC_SYNC is returned 
and hits resume_route.
Here $rc is -4 (ASYNC_SYNC), which is $rc < 0, and am sending 403 Forbidden, 
due to which other calls are failing.

In the resume function, I have added some logic after getting the HTTP 
response, what should be done for further handling INVITE request.
In these failure calls,  it never had a chance to hit the resume function and 
hence other calls are failing.

Regards,
Agalya

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


If you notice that log, then the transfer was completed together with the TCP 
connect operation, an ideal situation! There is no need to call the resume 
function anymore, since we already have all the data. As soon as we return 
ASYNC_SYNC, the resume_route will be called.

What do you mean by "most of the call fails"? Are you missing any data?

Liviu Chircu

OpenSIPS Developer

http://www.opensips-solutions.com
On 13.09.2016 21:56, Ramachandran, Agalya (Contractor) wrote:
Hi Liviu,

One more observance.  Am trying to load test on the main branch where you have 
provided your fix.
Am using REST API as, async. After receiving the response for the HTTP request, 
I will process the incoming SIP INVITE.

If am sending 50 calls at 2 calls per sec from sipp, -in this case it works 
perfectly fine.
If am sending 50 calls at 5 calls per sec from sipp, most of the call fails.

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.
It is printing LM_DBG("done, no need for async!\n"); and returns ASYNC_SYNC;
Any idea why for few calls, it is not acting as async? Particularly if I 
increase cps, am seeing this behavior.

Please let me know if am missing something.

Regards,
Agalya

From: users-boun...@lists.op

Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-15 Thread Liviu Chircu
In OpenSIPS script, you can obtain similar results to strtok() with the 
"s.select" string transformation [1].


[1]: http://www.opensips.org/Documentation/Script-Tran-2-3#toc6

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

On 14.09.2016 21:57, Ramachandran, Agalya (Contractor) wrote:


Hi Liviu,

I have tested by treating ASYNC_SYNC as success. Now calls are not 
failing.


When I tried to print the HTTP response which is available in 
$var(body), I could able to see the payload for HTTP response.


{"status":200,"hasErrors":false,"id":"b991f6c0-790f-11e6-82ef-05ba3d7a5b9d@*test.comcast.net* 
","timestamp":1473975975,"messageId":0,"Token":"2de3dbv7823wxcas3fgf"}


I have a question here. When I receive the response in resume function 
I will do a strtok and extract the domain name “test.comcast.net”.


If am not hitting resume function and it comes directly to 
resume_route, how the extraction of the domain from the response 
string can be achieved?


Because regular ‘C’ code and ‘C’ string library won’t work with 
opensips config file.


Can you please share any documentation you have for extracting 
particular value from a sting in config file? I see the documentation 
to form a string but not vice versa.


Regards,
Agalya.

*From:*Liviu Chircu [mailto:li...@opensips.org]
*Sent:* Wednesday, September 14, 2016 12:25 PM
*To:* Ramachandran, Agalya (Contractor) 
; OpenSIPS users mailling list 

*Subject:* Re: [OpenSIPS-Users] FW: Asynchronous operation for REST 
queries


So you are doing the $rc < 0 check in the beginning of the 
resume_route? If yes, could you treat ASYNC_SYNC as a success (it 
actually is!), and see if your output variables are properly populated 
with the transferred data?


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

On 14.09.2016 18:58, Ramachandran, Agalya (Contractor) wrote:

Hi Liviu,

I understand this way.

When we are getting more calls in opensips, and  the TCP port is
been open in that particular time window.

At that time when it tries to send HTTP request,
start_async_http_req is called, since is the port is already open,
it is assuming that async is completed.

Am I right?

*most of the call fails*– meaning that for first 15 to 20 calls
call is successful from end to end.

After that for the rest of the calls, it fails because
*ASYNC_SYNC* is returned and hits resume_route.

Here $rc is -4 (ASYNC_SYNC), which is $rc < 0, and am sending 403
Forbidden, due to which other calls are failing.

In the resume function, I have added some logic after getting the
HTTP response, what should be done for further handling INVITE
request.

In these failure calls,  it never had a chance to hit the resume
function and hence other calls are failing.

Regards,

Agalya

*From:*Liviu Chircu [mailto:li...@opensips.org]
*Sent:* Wednesday, September 14, 2016 4:45 AM
*To:* Ramachandran, Agalya (Contractor)

<mailto:agalya_ramachand...@comcast.com>; OpenSIPS users mailling
list  <mailto:users@lists.opensips.org>
*Subject:* Re: [OpenSIPS-Users] FW: Asynchronous operation for
REST queries

If you notice that log, then the transfer was completed together
with the TCP connect operation, an ideal situation! There is no
need to call the resume function anymore, since we already have
all the data. As soon as we return ASYNC_SYNC, the resume_route
will be called.

What do you mean by "most of the call fails"? Are you missing any
data?

Liviu Chircu

OpenSIPS Developer

http://www.opensips-solutions.com

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

Hi Liviu,

One more observance.  Am trying to load test on the main
branch where you have provided your fix.

Am using REST API as, async. After receiving the response for
the HTTP request, I will process the incoming SIP INVITE.

If am sending 50 calls at 2 calls per sec from sipp, -in this
case it works perfectly fine.

If am sending 50 calls at 5 calls per sec from sipp, most of
the call fails.

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.

It is printing LM_DBG("done, no need for async!\n"); and
returns ASYNC_SYNC;

Any idea why for few calls, it is not acting as async?
Particularly if I increase cps, am seeing this behavior.

Please let me know if am missing something.

Regards,
Agalya

*From:*users-boun...@lists.opensips.org
<mailto:users-boun...@lists.opensips.org>
[mailto:users-boun...@lists.opensips.org] *On Behalf Of
*Ramachandran, Agalya (Contracto

Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-15 Thread Liviu Chircu

On 14.09.2016 21:33, Ramachandran, Agalya (Contractor) wrote:

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?


Yes.


Also, I observed in the case of async call, it takes ~90 to 100ms to 
open the port itself. Is this expected behavior?



Yes.

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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-14 Thread Ramachandran, Agalya (Contractor)
Hi Liviu,

I have tested by treating ASYNC_SYNC as success. Now calls are not failing.
When I tried to print the HTTP response which is available in $var(body), I 
could able to see the payload for HTTP response.
{"status":200,"hasErrors":false,"id":"b991f6c0-790f-11e6-82ef-05ba3d7a5...@test.comcast.net
 ","timestamp":1473975975,"messageId":0,"Token":"2de3dbv7823wxcas3fgf"}

I have a question here. When I receive the response in resume function I will 
do a strtok and extract the domain name "test.comcast.net".

If am not hitting resume function and it comes directly to resume_route, how 
the extraction of the domain from the response string can be achieved?
Because regular 'C' code and 'C' string library won't work with opensips config 
file.
Can you please share any documentation you have for extracting particular value 
from a sting in config file? I see the documentation to form a string but not 
vice versa.

Regards,
Agalya.

From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Wednesday, September 14, 2016 12:25 PM
To: Ramachandran, Agalya (Contractor) ; 
OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries


So you are doing the $rc < 0 check in the beginning of the resume_route? If 
yes, could you treat ASYNC_SYNC as a success (it actually is!), and see if your 
output variables are properly populated with the transferred data?

Liviu Chircu

OpenSIPS Developer

http://www.opensips-solutions.com
On 14.09.2016 18:58, Ramachandran, Agalya (Contractor) wrote:
Hi Liviu,

I understand this way.
When we are getting more calls in opensips, and  the TCP port is been open in 
that particular time window.
At that time when it tries to send HTTP request, start_async_http_req is 
called, since is the port is already open, it is assuming that async is 
completed.
Am I right?

most of the call fails - meaning that for first 15 to 20 calls call is 
successful from end to end.
After that for the rest of the calls, it fails because ASYNC_SYNC is returned 
and hits resume_route.
Here $rc is -4 (ASYNC_SYNC), which is $rc < 0, and am sending 403 Forbidden, 
due to which other calls are failing.

In the resume function, I have added some logic after getting the HTTP 
response, what should be done for further handling INVITE request.
In these failure calls,  it never had a chance to hit the resume function and 
hence other calls are failing.

Regards,
Agalya

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


If you notice that log, then the transfer was completed together with the TCP 
connect operation, an ideal situation! There is no need to call the resume 
function anymore, since we already have all the data. As soon as we return 
ASYNC_SYNC, the resume_route will be called.

What do you mean by "most of the call fails"? Are you missing any data?

Liviu Chircu

OpenSIPS Developer

http://www.opensips-solutions.com
On 13.09.2016 21:56, Ramachandran, Agalya (Contractor) wrote:
Hi Liviu,

One more observance.  Am trying to load test on the main branch where you have 
provided your fix.
Am using REST API as, async. After receiving the response for the HTTP request, 
I will process the incoming SIP INVITE.

If am sending 50 calls at 2 calls per sec from sipp, -in this case it works 
perfectly fine.
If am sending 50 calls at 5 calls per sec from sipp, most of the call fails.

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.
It is printing LM_DBG("done, no need for async!\n"); and returns ASYNC_SYNC;
Any idea why for few calls, it is not acting as async? Particularly if I 
increase cps, am seeing this behavior.

Please let me know if am missing something.

Regards,
Agalya

From: users-boun...@lists.opensips.org<mailto:users-boun...@lists.opensips.org> 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Ramachandran, Agalya 
(Contractor)
Sent: Tuesday, September 13, 2016 2:14 PM
To: Liviu Chircu <mailto:li...@opensips.org>; OpenSIPS 
users mailling list <mailto:users@lists.opensips.org>
Subject: Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

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 th

Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-14 Thread Ramachandran, Agalya (Contractor)
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:li...@opensips.org]
Sent: Wednesday, September 14, 2016 4:33 AM
To: Ramachandran, Agalya (Contractor) ; 
OpenSIPS users mailling list 
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:li...@opensips.org]
Sent: Monday, September 12, 2016 4:06 AM
To: OpenSIPS users mailling list 
; Ramachandran, 
Agalya (Contractor) 

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=2ms)!


Regards,
Agalya

From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Thursday, September 08, 2016 7:05 AM
To: Ramachandran, Agalya (Contractor) 
; 
Bogdan-Andrei Iancu ; OpenSIPS 
users mailling list 
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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-14 Thread Liviu Chircu
So you are doing the $rc < 0 check in the beginning of the resume_route? 
If yes, could you treat ASYNC_SYNCas a success (it actually is!), and 
see if your output variables are properlypopulated with the transferred 
data?


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

On 14.09.2016 18:58, Ramachandran, Agalya (Contractor) wrote:


Hi Liviu,

I understand this way.

When we are getting more calls in opensips, and  the TCP port is been 
open in that particular time window.


At that time when it tries to send HTTP request, start_async_http_req 
is called, since is the port is already open, it is assuming that 
async is completed.


Am I right?

*most of the call fails*– meaning that for first 15 to 20 calls call 
is successful from end to end.


After that for the rest of the calls, it fails because *ASYNC_SYNC* is 
returned and hits resume_route.


Here $rc is -4 (ASYNC_SYNC), which is $rc < 0, and am sending 403 
Forbidden, due to which other calls are failing.


In the resume function, I have added some logic after getting the HTTP 
response, what should be done for further handling INVITE request.


In these failure calls,  it never had a chance to hit the resume 
function and hence other calls are failing.


Regards,

Agalya

*From:*Liviu Chircu [mailto:li...@opensips.org]
*Sent:* Wednesday, September 14, 2016 4:45 AM
*To:* Ramachandran, Agalya (Contractor) 
; OpenSIPS users mailling list 

*Subject:* Re: [OpenSIPS-Users] FW: Asynchronous operation for REST 
queries


If you notice that log, then the transfer was completed together with 
the TCP connect operation, an ideal situation! There is no need to 
call the resume function anymore, since we already have all the data. 
As soon as we return ASYNC_SYNC, the resume_route will be called.


What do you mean by "most of the call fails"? Are you missing any data?

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

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

Hi Liviu,

One more observance.  Am trying to load test on the main branch
where you have provided your fix.

Am using REST API as, async. After receiving the response for the
HTTP request, I will process the incoming SIP INVITE.

If am sending 50 calls at 2 calls per sec from sipp, -in this case
it works perfectly fine.

If am sending 50 calls at 5 calls per sec from sipp, most of the
call fails.

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.

It is printing LM_DBG("done, no need for async!\n"); and returns
ASYNC_SYNC;

Any idea why for few calls, it is not acting as async?
Particularly if I increase cps, am seeing this behavior.

Please let me know if am missing something.

Regards,
Agalya

*From:*users-boun...@lists.opensips.org
<mailto:users-boun...@lists.opensips.org>
[mailto:users-boun...@lists.opensips.org] *On Behalf Of
*Ramachandran, Agalya (Contractor)
*Sent:* Tuesday, September 13, 2016 2:14 PM
*To:* Liviu Chircu 
<mailto:li...@opensips.org>; OpenSIPS users mailling list
 <mailto:users@lists.opensips.org>
*Subject:* Re: [OpenSIPS-Users] FW: Asynchronous operation for
REST queries

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 mailto:users@lists.opensips.org>>; Ramachandran, Agalya
(Contractor) mailto: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.0

Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-14 Thread Ramachandran, Agalya (Contractor)
Hi Liviu,

I understand this way.
When we are getting more calls in opensips, and  the TCP port is been open in 
that particular time window.
At that time when it tries to send HTTP request, start_async_http_req is 
called, since is the port is already open, it is assuming that async is 
completed.
Am I right?

most of the call fails - meaning that for first 15 to 20 calls call is 
successful from end to end.
After that for the rest of the calls, it fails because ASYNC_SYNC is returned 
and hits resume_route.
Here $rc is -4 (ASYNC_SYNC), which is $rc < 0, and am sending 403 Forbidden, 
due to which other calls are failing.

In the resume function, I have added some logic after getting the HTTP 
response, what should be done for further handling INVITE request.
In these failure calls,  it never had a chance to hit the resume function and 
hence other calls are failing.

Regards,
Agalya

From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Wednesday, September 14, 2016 4:45 AM
To: Ramachandran, Agalya (Contractor) ; 
OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries


If you notice that log, then the transfer was completed together with the TCP 
connect operation, an ideal situation! There is no need to call the resume 
function anymore, since we already have all the data. As soon as we return 
ASYNC_SYNC, the resume_route will be called.

What do you mean by "most of the call fails"? Are you missing any data?

Liviu Chircu

OpenSIPS Developer

http://www.opensips-solutions.com
On 13.09.2016 21:56, Ramachandran, Agalya (Contractor) wrote:
Hi Liviu,

One more observance.  Am trying to load test on the main branch where you have 
provided your fix.
Am using REST API as, async. After receiving the response for the HTTP request, 
I will process the incoming SIP INVITE.

If am sending 50 calls at 2 calls per sec from sipp, -in this case it works 
perfectly fine.
If am sending 50 calls at 5 calls per sec from sipp, most of the call fails.

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.
It is printing LM_DBG("done, no need for async!\n"); and returns ASYNC_SYNC;
Any idea why for few calls, it is not acting as async? Particularly if I 
increase cps, am seeing this behavior.

Please let me know if am missing something.

Regards,
Agalya

From: users-boun...@lists.opensips.org<mailto:users-boun...@lists.opensips.org> 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Ramachandran, Agalya 
(Contractor)
Sent: Tuesday, September 13, 2016 2:14 PM
To: Liviu Chircu <mailto:li...@opensips.org>; OpenSIPS 
users mailling list <mailto:users@lists.opensips.org>
Subject: Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

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 
mailto:users@lists.opensips.org>>; Ramachandran, 
Agalya (Contractor) 
mailto: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=2ms)!


Regards,
Agalya

From: Liviu Chircu [mailto

Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-14 Thread Liviu Chircu
If you notice that log, then the transfer was completed together with 
the TCP connect operation, an ideal situation! There is no need to call 
the resume function anymore, since we already have all the data. As soon 
as we return ASYNC_SYNC, the resume_route will be called.


What do you mean by "most of the call fails"? Are you missing any data?

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

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


Hi Liviu,

One more observance.  Am trying to load test on the main branch where 
you have provided your fix.


Am using REST API as, async. After receiving the response for the HTTP 
request, I will process the incoming SIP INVITE.


If am sending 50 calls at 2 calls per sec from sipp, -in this case it 
works perfectly fine.


If am sending 50 calls at 5 calls per sec from sipp, most of the call 
fails.


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.


It is printing LM_DBG("done, no need for async!\n"); and returns 
ASYNC_SYNC;


Any idea why for few calls, it is not acting as async? Particularly if 
I increase cps, am seeing this behavior.


Please let me know if am missing something.

Regards,
Agalya

*From:*users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] *On Behalf Of *Ramachandran, 
Agalya (Contractor)

*Sent:* Tuesday, September 13, 2016 2:14 PM
*To:* Liviu Chircu ; OpenSIPS users mailling list 

*Subject:* Re: [OpenSIPS-Users] FW: Asynchronous operation for REST 
queries


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 <mailto:users@lists.opensips.org>>; Ramachandran, Agalya (Contractor) 
mailto: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=2ms)!

Regards,

Agalya

*From:*Liviu Chircu [mailto:li...@opensips.org]
*Sent:* Thursday, September 08, 2016 7:05 AM
*To:* Ramachandran, Agalya (Contractor)

<mailto:agalya_ramachand...@comcast.com>; Bogdan-Andrei Iancu
 <mailto:bog...@opensips.org>; OpenSIPS users
mailling list 
<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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-14 Thread Liviu Chircu

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 ; 
Ramachandran, Agalya (Contractor) 

*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=2ms)!

Regards,

Agalya

*From:*Liviu Chircu [mailto:li...@opensips.org]
*Sent:* Thursday, September 08, 2016 7:05 AM
*To:* Ramachandran, Agalya (Contractor)

; Bogdan-Andrei Iancu
 ; OpenSIPS users
mailling list 

*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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-13 Thread Ramachandran, Agalya (Contractor)
Hi Liviu,

One more observance.  Am trying to load test on the main branch where you have 
provided your fix.
Am using REST API as, async. After receiving the response for the HTTP request, 
I will process the incoming SIP INVITE.

If am sending 50 calls at 2 calls per sec from sipp, -in this case it works 
perfectly fine.
If am sending 50 calls at 5 calls per sec from sipp, most of the call fails.

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.
It is printing LM_DBG("done, no need for async!\n"); and returns ASYNC_SYNC;
Any idea why for few calls, it is not acting as async? Particularly if I 
increase cps, am seeing this behavior.

Please let me know if am missing something.

Regards,
Agalya

From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Ramachandran, Agalya 
(Contractor)
Sent: Tuesday, September 13, 2016 2:14 PM
To: Liviu Chircu ; OpenSIPS users mailling list 

Subject: Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

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 
mailto:users@lists.opensips.org>>; Ramachandran, 
Agalya (Contractor) 
mailto: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=2ms)!


Regards,
Agalya

From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Thursday, September 08, 2016 7:05 AM
To: Ramachandran, Agalya (Contractor) 
<mailto:agalya_ramachand...@comcast.com>; 
Bogdan-Andrei Iancu <mailto:bog...@opensips.org>; OpenSIPS 
users mailling list <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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-13 Thread Ramachandran, Agalya (Contractor)
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 ; Ramachandran, 
Agalya (Contractor) 
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=2ms)!


Regards,
Agalya

From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Thursday, September 08, 2016 7:05 AM
To: Ramachandran, Agalya (Contractor) 
; 
Bogdan-Andrei Iancu ; OpenSIPS 
users mailling list 
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


Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-12 Thread Ramachandran, Agalya (Contractor)
Hi team,

Any clue on this below topic would be a great. Am stuck with this 10 sec delay 
and couldn't move further.
If I could be able to find the root cause and resolve this , then only I can 
implement REST API calls as async.
Because this 10 sec delay is a huge time.  Please help me on this.

Regards,
Agalya

From: Ramachandran, Agalya (Contractor)
Sent: Tuesday, August 30, 2016 10:13 AM
To: 'Liviu Chircu' 
Subject: RE: FW: [OpenSIPS-Users] Asynchronous operation for REST queries

Hi Liviu,

A clue for this 10 sec delay consumed by opensips before sending the HTTP 
request, will be grateful for me. As far as I debugged this delay is caused by 
curl library. But wondering what could be the cause for this constant 10.25 sec 
delay.?

Please help me out in this.

Regards,
Agalya
From: Ramachandran, Agalya (Contractor)
Sent: Friday, August 26, 2016 2:29 PM
To: 'Liviu Chircu' mailto:li...@opensips.org>>
Cc: OpenSIPS users mailling list 
mailto:users@lists.opensips.org>>
Subject: RE: FW: [OpenSIPS-Users] Asynchronous operation for REST queries

Hi Liviu,

Here is the dump from the time when the socket is opened and when the request 
sent out.
Highlighted in RED color. Any clue for this 10 sec delay?

17:29:56.430379 IP6 sturn-test.novalocal.44797 > 
destination.rtc.sys.comcast.net.webcache: Flags [S], seq 3356294440, win 28800, 
options [mss 1440,sackOK,TS val 3588300781 ecr 0,nop,wscale 7], length 0
0x:  6000  0028 0640 2001 0558 fc0b 0100  
`(.@...X
0x0010:  f816 3eff fed5 0bfe 2001 0558 fc11   ..>X
0x0020:  f816 3eff fe11 d5aa aefd 1f90 c80c fd28  ..>(
0x0030:    a002 7080 90bb  0204 05a0  ..p.
0x0040:  0402 080a d5e1 1fed   0103 0307  
17:29:56.436526 IP6 destination.rtc.sys.comcast.net.webcache > 
sturn-test.novalocal.44797: Flags [S.], seq 4065018495, ack 3356294441, win 
28560, options [mss 1440,sackOK,TS val 1771678349 ecr 3588300781,nop,wscale 9], 
length 0
0x:  6000  0028 063a 2001 0558 fc11   `(.:...X
0x0010:  f816 3eff fe11 d5aa 2001 0558 fc0b 0100  ..>X
0x0020:  f816 3eff fed5 0bfe 1f90 aefd f24b 427f  ..>..KB.
0x0030:  c80c fd29 a012 6f90 755f  0204 05a0  ...)..o.u_..
0x0040:  0402 080a 6999 aa8d d5e1 1fed 0103 0309  i...
17:29:56.436575 IP6 sturn-test.novalocal.44797 > 
destination.rtc.sys.comcast.net.webcache: Flags [.], ack 1, win 225, options 
[nop,nop,TS val 3588300787 ecr 1771678349], length 0
0x:  6000  0020 0640 2001 0558 fc0b 0100  `..@...X
0x0010:  f816 3eff fed5 0bfe 2001 0558 fc11   ..>X
0x0020:  f816 3eff fe11 d5aa aefd 1f90 c80c fd29  ..>)
0x0030:  f24b 4280 8010 00e1 90b3  0101 080a  .KB.
0x0040:  d5e1 1ff3 6999 aa8d  i...

17:30:06.667279 IP6 sturn-test.novalocal.44797 > 
destination.rtc.sys.comcast.net.webcache: Flags [P.], seq 1:681, ack 1, win 
225, options [nop,nop,TS val 3588311018 ecr 1771678349], length 680
PUT./RTCGSessionManager/rest/tel/session/createroom?uid=pp&custguid=1-32...@xx.yyy.231.239..http/1.1..Host:.tr-sm-as-a-001.rtc.sys.comcast.net:8080..Accept:.*/*..Conten
 
t-Type:.application/json..Uid:.pp..serviceId:.tel..custguid:.1-32750@96.119.231.
 
239...x-tracking-id:.820..X-Trace:.trace-id=1-32750@96.119.231.239...x-server-name:.RTCGSM..x-client-name:.IMS
x-source-id:.OpenSIP..user-agent:.OpenSIPv1.11.3..device-id:.1-32...@xx.yyy.231.
 239...Content-Length:.211{"participantsInfo" 
:["211212"],"callType":"audio","instanceId": "1-32...@xx.yyy. 
231.239.","fromUID":"pp","fromTN":"pp","isOpenSipRequest":true,"
 displayName":"Call.From.IMS","deviceType":"Android/iOS/STB/IMS"}

17:30:06.672819 IP6 destination.rtc.sys.comcast.net.webcache > 
sturn-test.novalocal.44797: Flags [.], ack 681, win 59, options [nop,nop,TS val 
1771688585 ecr 3588311018], length 0
0x:  6000  0020 063a 2001 0558 fc11   `..:...X
0x0010:  f816 3eff fe11 d5aa 2001 0558 fc0b 0100  ..>X
0x0020:  f816 3eff fed5 0bfe 1f90 aefd f24b 4280  ..>..KB.
0x0030:  c80c ffd1 8010 003b c0cd  0101 080a  ...;
0x0040:  6999 d289 d5e1 47ea  i.G.
17:30:06.778978 IP6 destination.rtc.sys.comcast.net.webcache > 
sturn-test.novalocal.44797: Flags [P.], seq 1:358, ack 681, win 59, options 
[nop,nop,TS val 1771688691 ecr 3588311018], length 357
0x:  6000  0185 063a 2001 0558 fc11   `..:...X
0x0010:  f816 3eff fe11 d5aa 2001 0558 fc0b 0100  ..>X
0x0020:  f816 3eff fed5 0

Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-12 Thread Liviu Chircu

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 enabledebuglogging(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=2ms)!


Regards,

Agalya

*From:*Liviu Chircu [mailto:li...@opensips.org]
*Sent:* Thursday, September 08, 2016 7:05 AM
*To:* Ramachandran, Agalya (Contractor) 
; Bogdan-Andrei Iancu 
; OpenSIPS users mailling list 


*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

On 07.09.2016 20:14, Ramachandran, Agalya (Contractor) wrote:

Hi team,

Any clue on this below topic would be a great. Am stuck with this
10 sec delay and couldn’t move further.

If I could be able to find the root cause and resolve this , then
only I can implement REST API calls as async.

Because this 10 sec delay is a huge time.  Please help me on this.

Regards,

Agalya

*From:*Ramachandran, Agalya (Contractor)
*Sent:* Tuesday, August 30, 2016 10:13 AM
*To:* 'Liviu Chircu' mailto:li...@opensips.org>>
*Subject:* RE: FW: [OpenSIPS-Users] Asynchronous operation for
REST queries

Hi Liviu,

A clue for this 10 sec delay consumed by opensips before sending
the HTTP request, will be grateful for me. As far as I debugged
this delay is caused by curl library. But wondering what could be
the cause for this constant 10.25 sec delay.?

Please help me out in this.

Regards,

Agalya

*From:*Ramachandran, Agalya (Contractor)
*Sent:* Friday, August 26, 2016 2:29 PM
*To:* 'Liviu Chircu' mailto:li...@opensips.org>>
*Cc:* OpenSIPS users mailling list mailto:users@lists.opensips.org>>
*Subject:* RE: FW: [OpenSIPS-Users] Asynchronous operation for
REST queries

Hi Liviu,

Here is the dump from the time when the socket is opened and when
the request sent out.

Highlighted in RED color. Any clue for this 10 sec delay?

*17:29:56.430379 IP6 sturn-test.novalocal.44797*>
destination.rtc.sys.comcast.net.webcache: Flags [S], seq
3356294440, win 28800, options [mss 1440,sackOK,TS val 3588300781
ecr 0,nop,wscale 7], length 0

0x:  6000  0028 0640 2001 0558 fc0b 0100 
`(.@...X 


0x0010:  f816 3eff fed5 0bfe 2001 0558 fc11  
..>X


0x0020:  f816 3eff fe11 d5aa aefd 1f90 c80c fd28 
..>(


0x0030:    a002 7080 90bb  0204 05a0 
..p.


0x0040:  0402 080a d5e1 1fed   0103 0307 



17:29:56.436526 IP6 destination.rtc.sys.comcast.net.webcache >
sturn-test.novalocal.44797: Flags [S.], seq 4065018495, ack
3356294441, win 28560, options [mss 1440,sackOK,TS val 1771678349
ecr 3588300781,nop,wscale 9], length 0

0x:  6000  0028 063a 2001 0558 fc11  
`(.:...X


0x0010:  f816 3eff fe11 d5aa 2001 0558 fc0b 0100 
..>X


0x0020:  f816 3eff fed5 0bfe 1f90 aefd f24b 427f 
..>..KB.


0x0030:  c80c fd29 a012 6f90 755f  0204 05a0 
...)..o.u_..


0x0040:  0402 080a 6999 aa8d d5e1 1fed 0103 0309 
i...


17:29:56.436575 IP6 sturn-test.novalocal.44797 >
destination.rtc.sys.comcast.net.webcache: Flags [.], ack 1, win
225, options [nop,nop,TS val 3588300787 ecr 1771678349], length 0

0x:  6000  0020 0640 2001 0558 fc0b 0100 
`..@...X


0x0010:  f816 3eff fed5 0bfe 2001 0558 fc11 
 ..>X

0x0020:  f816 3eff fe11 d5aa aefd 1f90 c80c fd29 
..>)


0x0030:  f24b 4280 8010 00e1 90b3  0101 080a 
.KB.


0x0040:  d5e1 1ff3 

Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-09 Thread Ramachandran, Agalya (Contractor)
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=2ms)!


Regards,
Agalya

From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Thursday, September 08, 2016 7:05 AM
To: Ramachandran, Agalya (Contractor) ; 
Bogdan-Andrei Iancu ; OpenSIPS users mailling list 

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
On 07.09.2016 20:14, Ramachandran, Agalya (Contractor) wrote:
Hi team,

Any clue on this below topic would be a great. Am stuck with this 10 sec delay 
and couldn't move further.
If I could be able to find the root cause and resolve this , then only I can 
implement REST API calls as async.
Because this 10 sec delay is a huge time.  Please help me on this.

Regards,
Agalya

From: Ramachandran, Agalya (Contractor)
Sent: Tuesday, August 30, 2016 10:13 AM
To: 'Liviu Chircu' mailto:li...@opensips.org>>
Subject: RE: FW: [OpenSIPS-Users] Asynchronous operation for REST queries

Hi Liviu,

A clue for this 10 sec delay consumed by opensips before sending the HTTP 
request, will be grateful for me. As far as I debugged this delay is caused by 
curl library. But wondering what could be the cause for this constant 10.25 sec 
delay.?

Please help me out in this.

Regards,
Agalya
From: Ramachandran, Agalya (Contractor)
Sent: Friday, August 26, 2016 2:29 PM
To: 'Liviu Chircu' mailto:li...@opensips.org>>
Cc: OpenSIPS users mailling list 
mailto:users@lists.opensips.org>>
Subject: RE: FW: [OpenSIPS-Users] Asynchronous operation for REST queries

Hi Liviu,

Here is the dump from the time when the socket is opened and when the request 
sent out.
Highlighted in RED color. Any clue for this 10 sec delay?

17:29:56.430379 IP6 sturn-test.novalocal.44797 > 
destination.rtc.sys.comcast.net.webcache: Flags [S], seq 3356294440, win 28800, 
options [mss 1440,sackOK,TS val 3588300781 ecr 0,nop,wscale 7], length 0
0x:  6000  0028 0640 2001 0558 fc0b 0100  
`(.@...X
0x0010:  f816 3eff fed5 0bfe 2001 0558 fc11   ..>X
0x0020:  f816 3eff fe11 d5aa aefd 1f90 c80c fd28  ..>(
0x0030:    a002 7080 90bb  0204 05a0  ..p.
0x0040:  0402 080a d5e1 1fed   0103 0307  
17:29:56.436526 IP6 destination.rtc.sys.comcast.net.webcache > 
sturn-test.novalocal.44797: Flags [S.], seq 4065018495, ack 3356294441, win 
28560, options [mss 1440,sackOK,TS val 1771678349 ecr 3588300781,nop,wscale 9], 
length 0
0x:  6000  0028 063a 2001 0558 fc11   `(.:...X
0x0010:  f816 3eff fe11 d5aa 2001 0558 fc0b 0100  ..>X
0x0020:  f816 3eff fed5 0bfe 1f90 aefd f24b 427f  ..>..KB.
0x0030:  c80c fd29 a012 6f90 755f  0204 05a0  ...)..o.u_..
0x0040:  0402 080a 6999 aa8d d5e1 1fed 0103 0309  i...
17:29:56.436575 IP6 sturn-test.novalocal.44797 > 
destination.rtc.sys.comcast.net.webcache: Flags [.], ack 1, win 225, options 
[nop,nop,TS val 3588300787 ecr 1771678349], length 0
0x:  6000  0020 0640 2001 0558 fc0b 0100  `..@...X
0x0010:  f816 3eff fed5 0bfe 2001 0558 fc11   ..>X
0x0020:  f816 3eff fe11 d5aa aefd 1f90 c80c fd29  ..>)
0x0030:  f24b 4280 8010 00e1 90b3  0101 080a  .KB.
0x0040:  d5e1 1ff3 6999 aa8d  i...

17:30:06.667279 IP6 sturn-test.novalocal.44797 > 
destination.rtc.sys.comcast.net.webcache: Flags [P.], seq 1:681, ack 1, win 
225, options [nop,nop,TS val 3588311018 ecr 1771678349], length 680
PUT./RTCGSessionManager/rest/tel/session/createroom?uid=pp&custguid=1-32...@xx.yyy.231.239..http/1.1..Host:.tr-sm-as-a-001.rtc.sys.comcast.net:8080..Accept:.*/*..Conten
 
t-Type:.application/json..Uid:.pp..serviceId:.tel..custguid:.1-32750@96.119.231

Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-09 Thread Ramachandran, Agalya (Contractor)
Hi Liviu,

Thanks for the update and fix. I will update the patch and test it.
Will share you the results as soon as I complete it.

Regards,
Agalya

From: Liviu Chircu [mailto:li...@opensips.org]
Sent: Thursday, September 08, 2016 7:05 AM
To: Ramachandran, Agalya (Contractor) ; 
Bogdan-Andrei Iancu ; OpenSIPS users mailling list 

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
On 07.09.2016 20:14, Ramachandran, Agalya (Contractor) wrote:
Hi team,

Any clue on this below topic would be a great. Am stuck with this 10 sec delay 
and couldn't move further.
If I could be able to find the root cause and resolve this , then only I can 
implement REST API calls as async.
Because this 10 sec delay is a huge time.  Please help me on this.

Regards,
Agalya

From: Ramachandran, Agalya (Contractor)
Sent: Tuesday, August 30, 2016 10:13 AM
To: 'Liviu Chircu' mailto:li...@opensips.org>>
Subject: RE: FW: [OpenSIPS-Users] Asynchronous operation for REST queries

Hi Liviu,

A clue for this 10 sec delay consumed by opensips before sending the HTTP 
request, will be grateful for me. As far as I debugged this delay is caused by 
curl library. But wondering what could be the cause for this constant 10.25 sec 
delay.?

Please help me out in this.

Regards,
Agalya
From: Ramachandran, Agalya (Contractor)
Sent: Friday, August 26, 2016 2:29 PM
To: 'Liviu Chircu' mailto:li...@opensips.org>>
Cc: OpenSIPS users mailling list 
mailto:users@lists.opensips.org>>
Subject: RE: FW: [OpenSIPS-Users] Asynchronous operation for REST queries

Hi Liviu,

Here is the dump from the time when the socket is opened and when the request 
sent out.
Highlighted in RED color. Any clue for this 10 sec delay?

17:29:56.430379 IP6 sturn-test.novalocal.44797 > 
destination.rtc.sys.comcast.net.webcache: Flags [S], seq 3356294440, win 28800, 
options [mss 1440,sackOK,TS val 3588300781 ecr 0,nop,wscale 7], length 0
0x:  6000  0028 0640 2001 0558 fc0b 0100  
`(.@...X
0x0010:  f816 3eff fed5 0bfe 2001 0558 fc11   ..>X
0x0020:  f816 3eff fe11 d5aa aefd 1f90 c80c fd28  ..>(
0x0030:    a002 7080 90bb  0204 05a0  ..p.
0x0040:  0402 080a d5e1 1fed   0103 0307  
17:29:56.436526 IP6 destination.rtc.sys.comcast.net.webcache > 
sturn-test.novalocal.44797: Flags [S.], seq 4065018495, ack 3356294441, win 
28560, options [mss 1440,sackOK,TS val 1771678349 ecr 3588300781,nop,wscale 9], 
length 0
0x:  6000  0028 063a 2001 0558 fc11   `(.:...X
0x0010:  f816 3eff fe11 d5aa 2001 0558 fc0b 0100  ..>X
0x0020:  f816 3eff fed5 0bfe 1f90 aefd f24b 427f  ..>..KB.
0x0030:  c80c fd29 a012 6f90 755f  0204 05a0  ...)..o.u_..
0x0040:  0402 080a 6999 aa8d d5e1 1fed 0103 0309  i...
17:29:56.436575 IP6 sturn-test.novalocal.44797 > 
destination.rtc.sys.comcast.net.webcache: Flags [.], ack 1, win 225, options 
[nop,nop,TS val 3588300787 ecr 1771678349], length 0
0x:  6000  0020 0640 2001 0558 fc0b 0100  `..@...X
0x0010:  f816 3eff fed5 0bfe 2001 0558 fc11   ..>X
0x0020:  f816 3eff fe11 d5aa aefd 1f90 c80c fd29  ..>)
0x0030:  f24b 4280 8010 00e1 90b3  0101 080a  .KB.
0x0040:  d5e1 1ff3 6999 aa8d  i...

17:30:06.667279 IP6 sturn-test.novalocal.44797 > 
destination.rtc.sys.comcast.net.webcache: Flags [P.], seq 1:681, ack 1, win 
225, options [nop,nop,TS val 3588311018 ecr 1771678349], length 680
PUT./RTCGSessionManager/rest/tel/session/createroom?uid=pp&custguid=1-32...@xx.yyy.231.239..http/1.1..Host:.tr-sm-as-a-001.rtc.sys.comcast.net:8080..Accept:.*/*..Conten
 
t-Type:.application/json..Uid:.pp..serviceId:.tel..custguid:.1-32750@96.119.231.
 
239...x-tracking-id:.820..X-Trace:.trace-id=1-32750@96.119.231.239...x-server-name:.RTCGSM..x-client-name:.IMS
x-source-id:.OpenSIP..user-agent:.OpenSIPv1.11.3..device-id:.1-32...@xx.yyy.231

Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-09-08 Thread Liviu Chircu

Hi, Agalya!

Regarding the 10s delayproblem, 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

On 07.09.2016 20:14, Ramachandran, Agalya (Contractor) wrote:


Hi team,

Any clue on this below topic would be a great. Am stuck with this 10 
sec delay and couldn’t move further.


If I could be able to find the root cause and resolve this , then only 
I can implement REST API calls as async.


Because this 10 sec delay is a huge time.  Please help me on this.

Regards,

Agalya

*From:*Ramachandran, Agalya (Contractor)
*Sent:* Tuesday, August 30, 2016 10:13 AM
*To:* 'Liviu Chircu' mailto:li...@opensips.org>>
*Subject:* RE: FW: [OpenSIPS-Users] Asynchronous operation for REST 
queries


Hi Liviu,

A clue for this 10 sec delay consumed by opensips before sending the 
HTTP request, will be grateful for me. As far as I debugged this delay 
is caused by curl library. But wondering what could be the cause for 
this constant 10.25 sec delay.?


Please help me out in this.

Regards,

Agalya

*From:*Ramachandran, Agalya (Contractor)
*Sent:* Friday, August 26, 2016 2:29 PM
*To:* 'Liviu Chircu' mailto:li...@opensips.org>>
*Cc:* OpenSIPS users mailling list >
*Subject:* RE: FW: [OpenSIPS-Users] Asynchronous operation for REST 
queries


Hi Liviu,

Here is the dump from the time when the socket is opened and when the 
request sent out.


Highlighted in RED color. Any clue for this 10 sec delay?

*17:29:56.430379 IP6 sturn-test.novalocal.44797*> 
destination.rtc.sys.comcast.net.webcache: Flags [S], seq 3356294440, 
win 28800, options [mss 1440,sackOK,TS val 3588300781 ecr 0,nop,wscale 
7], length 0


0x:  6000  0028 0640 2001 0558 fc0b 0100  `(.@...X 



0x0010:  f816 3eff fed5 0bfe 2001 0558 fc11   ..>X

0x0020:  f816 3eff fe11 d5aa aefd 1f90 c80c fd28  ..>(

0x0030:    a002 7080 90bb  0204 05a0  ..p.

0x0040:  0402 080a d5e1 1fed   0103 0307  

17:29:56.436526 IP6 destination.rtc.sys.comcast.net.webcache > 
sturn-test.novalocal.44797: Flags [S.], seq 4065018495, ack 
3356294441, win 28560, options [mss 1440,sackOK,TS val 1771678349 ecr 
3588300781,nop,wscale 9], length 0


0x:  6000  0028 063a 2001 0558 fc11   `(.:...X

0x0010:  f816 3eff fe11 d5aa 2001 0558 fc0b 0100  ..>X

0x0020:  f816 3eff fed5 0bfe 1f90 aefd f24b 427f  ..>..KB.

0x0030:  c80c fd29 a012 6f90 755f  0204 05a0  ...)..o.u_..

0x0040:  0402 080a 6999 aa8d d5e1 1fed 0103 0309  i...

17:29:56.436575 IP6 sturn-test.novalocal.44797 > 
destination.rtc.sys.comcast.net.webcache: Flags [.], ack 1, win 225, 
options [nop,nop,TS val 3588300787 ecr 1771678349], length 0


0x:  6000  0020 0640 2001 0558 fc0b 0100  `..@...X

0x0010:  f816 3eff fed5 0bfe 2001 0558 fc11   ..>X

0x0020:  f816 3eff fe11 d5aa aefd 1f90 c80c fd29  ..>)

0x0030:  f24b 4280 8010 00e1 90b3  0101 080a  .KB.

0x0040:  d5e1 1ff3 6999 aa8d  i...

*17:30:06.667279 IP6 sturn-test.novalocal.44797*> 
destination.rtc.sys.comcast.net.webcache: Flags [P.], seq 1:681, ack 
1, win 225, options [nop,nop,TS val 3588311018 ecr 1771678349], length 680


PUT./RTCGSessionManager/rest/tel/session/createroom?uid=pp&custguid=1-32...@xx.yyy.231.239..http/1.1..Host:.tr-sm-as-a-001.rtc.sys.comcast.net:8080..Accept:.*/*..Conten 
 
t-Type:.application/json..Uid:.pp..serviceId:.tel..custguid:.1-32750@96.119.231. 
239...x-tracking-id:.820..X-Trace:.trace-id=1-32750@96.119.231.239...x-server-name:.RTCGSM..x-client-name:.IMS


x-source-id:.OpenSIP..user-agent:.OpenSIPv1.11.3..device-id:.1-32...@xx.yyy.231. 
239...Content-Length:.211{"participantsInfo" 
:["211212"],"callType":"audio","instanceId": "1-32...@xx.yyy. 
231.239. 
","fromUID":"pp","fromTN":"pp","isOpenSipRequest":true," 
displayName":"Call.From.IMS","deviceType":"Android/iOS/STB/IMS"}


17:30:06.672819 IP6 destination.rtc.sys.comcast.net.webcache > 
sturn-test.novalocal.44797: Flags [.], ack 681, win 59, options 
[nop,nop,TS val 1771688585 ecr 3588311018], length 0


0x:  6000  0020 063a 2001 0558 fc11   `..:...X

0x0010:  f816 3eff fe11 d5aa 2001 0558 fc0b 0100  ..>...

Re: [OpenSIPS-Users] FW: Asynchronous operation for REST queries

2016-08-26 Thread Ramachandran, Agalya (Contractor)
Hi Liviu,

Here is the dump from the time when the socket is opened and when the request 
sent out.
Highlighted in RED color. Any clue for this 10 sec delay?

17:29:56.430379 IP6 sturn-test.novalocal.44797 > 
destination.rtc.sys.comcast.net.webcache: Flags [S], seq 3356294440, win 28800, 
options [mss 1440,sackOK,TS val 3588300781 ecr 0,nop,wscale 7], length 0
0x:  6000  0028 0640 2001 0558 fc0b 0100  
`(.@...X
0x0010:  f816 3eff fed5 0bfe 2001 0558 fc11   ..>X
0x0020:  f816 3eff fe11 d5aa aefd 1f90 c80c fd28  ..>(
0x0030:    a002 7080 90bb  0204 05a0  ..p.
0x0040:  0402 080a d5e1 1fed   0103 0307  
17:29:56.436526 IP6 destination.rtc.sys.comcast.net.webcache > 
sturn-test.novalocal.44797: Flags [S.], seq 4065018495, ack 3356294441, win 
28560, options [mss 1440,sackOK,TS val 1771678349 ecr 3588300781,nop,wscale 9], 
length 0
0x:  6000  0028 063a 2001 0558 fc11   `(.:...X
0x0010:  f816 3eff fe11 d5aa 2001 0558 fc0b 0100  ..>X
0x0020:  f816 3eff fed5 0bfe 1f90 aefd f24b 427f  ..>..KB.
0x0030:  c80c fd29 a012 6f90 755f  0204 05a0  ...)..o.u_..
0x0040:  0402 080a 6999 aa8d d5e1 1fed 0103 0309  i...
17:29:56.436575 IP6 sturn-test.novalocal.44797 > 
destination.rtc.sys.comcast.net.webcache: Flags [.], ack 1, win 225, options 
[nop,nop,TS val 3588300787 ecr 1771678349], length 0
0x:  6000  0020 0640 2001 0558 fc0b 0100  `..@...X
0x0010:  f816 3eff fed5 0bfe 2001 0558 fc11   ..>X
0x0020:  f816 3eff fe11 d5aa aefd 1f90 c80c fd29  ..>)
0x0030:  f24b 4280 8010 00e1 90b3  0101 080a  .KB.
0x0040:  d5e1 1ff3 6999 aa8d  i...

17:30:06.667279 IP6 sturn-test.novalocal.44797 > 
destination.rtc.sys.comcast.net.webcache: Flags [P.], seq 1:681, ack 1, win 
225, options [nop,nop,TS val 3588311018 ecr 1771678349], length 680
PUT./RTCGSessionManager/rest/tel/session/createroom?uid=pp&custguid=1-32...@xx.yyy.231.239..http/1.1..Host:.tr-sm-as-a-001.rtc.sys.comcast.net:8080..Accept:.*/*..Conten
 
t-Type:.application/json..Uid:.pp..serviceId:.tel..custguid:.1-32750@96.119.231.
 
239...x-tracking-id:.820..X-Trace:.trace-id=1-32750@96.119.231.239...x-server-name:.RTCGSM..x-client-name:.IMS
x-source-id:.OpenSIP..user-agent:.OpenSIPv1.11.3..device-id:.1-32...@xx.yyy.231.
 239...Content-Length:.211{"participantsInfo" 
:["211212"],"callType":"audio","instanceId": "1-32...@xx.yyy. 
231.239.","fromUID":"pp","fromTN":"pp","isOpenSipRequest":true,"
 displayName":"Call.From.IMS","deviceType":"Android/iOS/STB/IMS"}

17:30:06.672819 IP6 destination.rtc.sys.comcast.net.webcache > 
sturn-test.novalocal.44797: Flags [.], ack 681, win 59, options [nop,nop,TS val 
1771688585 ecr 3588311018], length 0
0x:  6000  0020 063a 2001 0558 fc11   `..:...X
0x0010:  f816 3eff fe11 d5aa 2001 0558 fc0b 0100  ..>X
0x0020:  f816 3eff fed5 0bfe 1f90 aefd f24b 4280  ..>..KB.
0x0030:  c80c ffd1 8010 003b c0cd  0101 080a  ...;
0x0040:  6999 d289 d5e1 47ea  i.G.
17:30:06.778978 IP6 destination.rtc.sys.comcast.net.webcache > 
sturn-test.novalocal.44797: Flags [P.], seq 1:358, ack 681, win 59, options 
[nop,nop,TS val 1771688691 ecr 3588311018], length 357
0x:  6000  0185 063a 2001 0558 fc11   `..:...X
0x0010:  f816 3eff fe11 d5aa 2001 0558 fc0b 0100  ..>X
0x0020:  f816 3eff fed5 0bfe 1f90 aefd f24b 4280  ..>..KB.
0x0030:  c80c ffd1 8018 003b 8583  0101 080a  ...;
0x0040:  6999 d2f3 d5e1 47ea 4854 5450 2f31 2e31  i.G.HTTP/1.1
0x0050:  2032 3030 204f 4b0d 0a53 6572 7665 723a  .200.OK..Server:

...

Regards,
Agalya
From: Ramachandran, Agalya (Contractor)
Sent: Friday, August 26, 2016 12:01 PM
To: 'Liviu Chircu' 
Subject: RE: FW: [OpenSIPS-Users] Asynchronous operation for REST queries

Hi Liviu,

As I already emailed you, to contribute the source code there is some approval 
process in our organization.
If that goes though I can contribute the REST PUT code.

But I have a question in async operation in opensips.
When a async mode REST API is called either POST/PUT, I see that opensips waits 
for 10 sec of time and then only it sends out the HTTP request out to the 
network.
Why there is a huge wait time of 10sec?

When I tried to debug, I found it is looping inside the below for loop for long 
time in rest_methods.c  file, (but all that looping are taking same seconds,