Hello Sergio, Sorry my response has taken so long. Could you be more specific about how you are using HttpClient and what is failing? In particular the following would be good:
- a piece of example code that demonstrates how you are using HttpClient, if this example could actually reproduce the problem that would be great. - a stack trace, etc. of the error you are seeing - a log from httpclient when you encounter this problem, see http://jakarta.apache.org/commons/httpclient/logging.html You should not need to manage the HttpConnection manually. In general you should not be using the HttpConnection directly at all. All of this should be handled by HttpMethod, HttpClient and the connection manager. FYI, I will not being checking my mail again until tomorrow, so please be patient with me if I do not respond until then. Thanks, Mike On Tue, 25 Mar 2003, Sergio Berna wrote: > Just one more question then, before ill try to correct it myself, im > assuming that the connections are been pooled inside the multhreadedmanager > so as to improve performance. > > The only problem im facing is that the manager doesnt realize the connection > is broken and i cant find any method to tell it, so the connection is > forever broken at the pool and no matter the attemps i do it is always used > first with the expected failure. > > Is there any method to expire the connection fotever or should i always > create a new HttpClient so that i can use a new pool? > > If it doesnt i could try solving this problem by automatically deleting a > connection which had thrown an IOException (then a reconnect would work) or > making a method to expunge it out of the pool. The last one is tricky since > you cant use it with the responsebody methods. > > Which one do you suggest? > > Sergio. > > > > -----Mensaje original----- > De: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] > Enviado el: martes, 25 de marzo de 2003 18:36 > Para: Commons HttpClient Project > Asunto: Re: connections on pool close unexpectedly > > > Sergio > > I regret that your message has been left unanswered for so long. The > problem is that out of 4 committers I seem to be the only one currently > monitoring this forum on a regular basis, and I just happened to not be > using connection pooling much. So, I am not the best source to turn to > in this regard. You'll have to wait until Mike gets back in order to get > a more informed opinion on your problem. > > However, that little can can tell: > > Both HTTP server and HTTP client may close connection at any time > according to the HTTP spec. I suppose that the HTTP server you are using > may be dripping connections after a minute of inactivity. This is a > perfectly standard compliant behavior. I am afraid you might have to > live with it and simply try the request after having caught a retriable > exception > > I would help you provided us with more detailed information on the setup > you are using > > Cheers > > Oleg > > > On Fri, 2003-03-21 at 14:13, Sergio Berna wrote: > > Hello, > > > > I am having problems with HttpClient 2.0-alpha3 when i try to pool it. > > > > After the first call to stablish a connection against a server i usually > can > > work with the client for 1 minue requetsing new pages. But after that > minute > > i think the connecion is been closed somehow because any new attempt to > > retrieve any file at the host is rejcted instantly with the message > > BrokenPipe. > > > > Afetr logging it the problem arises just after the first attemt to write > the > > HTTP header for the request so i suppose it is closed somehow either by > the > > client or the server and the client always attemps to write to the same > > stream. > > > > Thanks for your time. > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
