[erlang-questions] Http client sending http response to wrong handler

Pablo Platt pablo.platt@REDACTED
Tue Jun 7 17:15:32 CEST 2011


I think I had the same problem.

Try the following settings before you send the first request:

httpc:set_options([{max_pipeline_length, 0}, {max_sessions, NRequests}, {max_keep_alive_length, 0}])

NRequests is the number of concurrent requests you are going to use.



________________________________
From: Suma Shivaprasad <sumasai.shivaprasad@REDACTED>
To: erlang-questions@REDACTED
Sent: Monday, June 6, 2011 12:45 PM
Subject: [erlang-questions] Http client sending http response to wrong handler


Our app makes a lot of HTTP requests and we are facing this issue with both inets-5.5.1 and 5.3.2.

Basically our receive clause for the response is trying to match the request id returned in httpc:request call
and we see that the match always fails with the wrong Request Id .

We gave seen this mismatch in all 3 receive clauses for 
stream_start, stream and stream_end

What we observed after a lot of trial and error  is that if the same pid makes  the http requests , the responses get kind of muddled up but if we spawn a separate process for the httpc:request ,  it is better . But here too we have seen some occurrences of this faulty behaviour. 

Has anyone faced this issue ?

_______________________________________________
erlang-questions mailing list
erlang-questions@REDACTED
http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110607/e90159b8/attachment.htm>


More information about the erlang-questions mailing list