<div dir="ltr">Thanks, Ingela, I look forward to seeing the modifications. Hopefully you can post a patch so I don't have to wait for the next Erlang release.<br><br>Regards,<br>Edwin<br><br><div class="gmail_quote">On Mon, Aug 4, 2008 at 4:47 AM, Ingela Anderton Andin <span dir="ltr"><<a href="mailto:ingela@erix.ericsson.se">ingela@erix.ericsson.se</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Edward, a quick look at the HTTP-spec makes me believe you got a<br>
valid point.<br>
The current http client has gradually evolved from a user contribution<br>
and in the processes<br>
you may say it was totally rewritten, and we may have missed an aspect<br>
here. (E.i. only used<br>
persistent connections for pipelined requests). But I do not<br>
have all details about this fresh in my memory as this was some time<br>
ago. We will have to take<br>
deeper look into this.  I have put it on the todo-list.  There are a few<br>
things that has<br>
higer priority right now but i hope we can deal with this issue fairly soon.<br>
<br>
Regards  Ingela- Erlang/OTP, Ericsson<br>
<div><div></div><div class="Wj3C7c"><br>
> I am using the inets HTTP client to POST many requests to the same URL. I am<br>
> finding that even though keep-alive is set, and persistent connections are<br>
> the default for HTTP 1.1 (which is what I am using), the inets HTTP client<br>
> is opening a new connection for every http:request(post,...) I send. I<br>
> verified this by using Wireshark to monitor the TCP/IP traffic. When there<br>
> is a lot of activity involving multiple clients, this causes ephemeral port<br>
> exhaustion because of the infamous TIME_WAIT problem. I have already reduced<br>
> the TCP wait time to 30 seconds and don't want to reduce it more.<br>
><br>
> I read the inets code, and if I understand it correctly, it seems that when<br>
> a non-idempotent operation such as POST is performed, httpc does not reuse<br>
> the existing connection (httpc_manager:select_session/4 returns<br>
> no_connection, which starts a new handler). I am not sure if this is the<br>
> correct thing to do, because my understanding is that the restriction on<br>
> non-idempotent operations applies to pipelining, not persistent connections.<br>
> I can see no reason why one should not be able to do a series of consecutive<br>
> POSTs on the same socket, as long as one waits for a reply before posting<br>
> the next request.<br>
><br>
> I'm not sure if this is a bug, a feature, or my misunderstanding, so I am<br>
> posting to this mailing list in the hope that someone, whose name may or may<br>
> not be Ingela, can enlighten me and perhaps suggest how I can use inets to<br>
> do multiple sequential POSTs on a persistent connection.<br>
><br>
> I'm using OTP R12B-3 on Ubuntu Linux 8.04. The http:request call uses all<br>
> default HTTP and TCP/IP options (i.e. empty lists).<br>
><br>
> Regards,<br>
> Edwin Fine<br>
><br>
<br>
</div></div>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>For every expert there is an equal and opposite expert - Arthur C. Clarke<br>
</div>