I use curl function to communicate with my tomcat server.
I noticed that curl request are not made concurrent but they are queued (FIFO).
Is there a way to change it?
I explain my problem.
If on a channel a curl will occupy 20 seconds, on any other channel a shortest curl will not be executed until the firs one is finished, so one call block all other calls.
Is there a workaround?
I tried it with asteris 1.8 and 1.11 and they have the same background.
Anyone has noticed the same problem?
I don’t think that this problem is really an Asterisk-One. Did You check Your tomcat to see wheter the second request is visible there while the first onme is still in process?
However: If You’re facing a 20 second response time on a CURL-Request in a callflow there’s something terribly wrong, as 20 seconds sound like eternity in this case …
The second request isnt received by tomcat until the first ends (asterisk dont send it, i used wireshark to test it).
I know that 20 seconds are a lot of time and that was an example, but if you call external webservices or connection to DB it can be a possible timeout…
Just think what will appen if I have like 100 calls, the system will stuck for an indefinite time also on simple curl calls (because it will wait for other to ends).
The only thing You may try is to use CURLOPT in front of the CURL request to set some timeout params.
And: If usage of the CURL-function is limited to one request at a time You should probably file a report on the digium issue tracker as I can’t imagine that this should be the intended behaviour.
Wish list items are not accepted on the issue tracker unless you also provide a source code patch to implement them.
Sincerly i dont know where to start searching this probale issue.
Can you give me some hint?