I do not think this is the problem Sergio is having. He seems to be having problems with connections becoming unusable, not having to many open connections. We shall see though.

Sergio, please let us know when you have more details so we can help you get to the bottom of this.

Thanks,

Mike

Carl A. Dunham wrote:
Sergio,

I had posted a crude patch a few days ago that partially solves this problem. It basically adds a wider connection pool that tracks free connections, closing them when needed and blocking requests in order to maintain a maximum number of open connections.

It is better, but still not quite right. Maybe it'll help you...

BTW, I'm not an httpclient developer, just a user trying to solve my own problems...

Carl


On Tuesday March 25 2003 12:45, 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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to