hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Becke <be...@u.washington.edu>
Subject Re: Running out of connections
Date Sat, 01 Feb 2003 17:18:55 GMT
Hello Simon,

Sorry to be replying so late.  Connections are released when:

1) the response is fully read
2) the connection is manually released via 
HttpMethod.releaseConnection() or HttpConnection.releaseConnection()
3) the garbage collector runs and reclaims any connections that are no 
longer being used

The most reliable way is to manually release the connection after use.  
This goes for successful or unsuccessful requests.  Can you send a 
sample of the code you are using that causes this problem?


On Wednesday, January 29, 2003, at 09:04 PM, Simon Roberts wrote:

> Gidday,
> With the current CVS version, I seem to be having a problem where I 
> run out of connections to a server.  It happens if I do a bunch of 
> HTTP operations that fail (404, as it happens) and the reply include a 
> "Connection: close".  If no garbage-collect happens then the 
> connections are not freed!
> Shouldn't we expire them if we're running out of connections?
> Cheers, Simon

View raw message