commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Becke <be...@u.washington.edu>
Subject Re: [HttpClient] Lifetime of an unused connection
Date Sat, 20 Nov 2004 23:40:47 GMT
Hi Tom,

In HttpClient 2.0 connections are never closed/deleted from a  
MultiThreadedHttpConnectionManager until it is shutdown.  Things like  
keep-alive settings and exceptions will cause connections to be closed,  
but they will still be returned to the connection manager.

HttpClient 3.0 (just about to be 3.0 beta1) adds the ability to close  
idle connections.  Have a look at the following for some more details:

<http://jakarta.apache.org/commons/httpclient/3.0/apidocs/org/apache/ 
commons/httpclient/ 
MultiThreadedHttpConnectionManager.html#closeIdleConnections(long)>

and

<http://jakarta.apache.org/commons/httpclient/3.0/apidocs/org/apache/ 
commons/httpclient/util/IdleConnectionTimeoutThread.html>

Mike

On Nov 19, 2004, at 5:00 AM, Tom van den Berge wrote:

> Hi,
>
> When using a MultiThreadedHttpConnectionManager for an HttpClient,  
> connections that are used and released again are placed back in the  
> pool again, so they can be reused. I was wondering for how long unused  
> connections will remain in the pool. In other words, what is causing a  
> connection to be removed from the pool?
>
> I can imagine it might be caused by the read timeout of the socket, or  
> there may be a separate 'keep alive' setting? Also the remote host  
> might terminate the connection after some time, and how does that  
> influence the connection object in the pool?
>
> I'm talking about httpclient 2.0.2.
>
> Thanks,
> Tom
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message