<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><br><span></span>I think I had the same problem.<br><span></span></div><div>Try the following settings before you send the first request:<br><span></span></div><div>httpc:set_options([{max_pipeline_length, 0}, {max_sessions, NRequests}, {max_keep_alive_length, 0}])</div><div><br></div><div>NRequests is the number of concurrent requests you are going to use.<br></div><div><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font size="2" face="Arial"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Suma Shivaprasad <sumasai.shivaprasad@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> erlang-questions@erlang.org<br><b><span style="font-weight: bold;">Sent:</span></b> Monday, June 6, 2011
12:45 PM<br><b><span style="font-weight: bold;">Subject:</span></b> [erlang-questions] Http client sending http response to wrong handler<br></font><br>
<meta http-equiv="x-dns-prefetch-control" content="off"><div id="yiv982438966">Our app makes a lot of HTTP requests and we are facing this issue with both inets-5.5.1 and 5.3.2.<br><br>Basically our receive clause for the response is trying to match the request id returned in httpc:request call<br>and we see that the match always fails with the wrong Request Id .<br>
<br>We gave seen this mismatch in all 3 receive clauses for <br>stream_start, stream and stream_end<br><br>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. <br>
<br>Has anyone faced this issue ?<br>
</div><meta http-equiv="x-dns-prefetch-control" content="on"><br>_______________________________________________<br>erlang-questions mailing list<br><a ymailto="mailto:erlang-questions@erlang.org" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br><br><br></div></div></div></body></html>