commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Diggory <mdigg...@gmail.com>
Subject Re: [httpclient] CLOSE_WAIT sticking around
Date Tue, 15 Nov 2005 22:22:25 GMT
Oleg Kalnichevski wrote:

>On Tue, 2005-11-15 at 16:23 -0500, Mark Diggory wrote:
>  
>
>>I'm getting a number of CLOSE_WAIT sockets between HttpClient and my 
>>Apache server. Do you know how I can configure HttpClient not to leave 
>>behind CLOSE_WAIT's?
>>
>>    
>>
>
>Mark,
>
>Consider implementing an idle connection handler
>
>For details see
>
>http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/HttpConnectionManager.html#closeIdleConnections(long)
>http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/util/IdleConnectionTimeoutThread.html
>
>Hope this helps
>
>Oleg
>  
>

Ok, That seems logical, I have another consideration that may change 
your recommendation, I'm using MultithreadedConnectionManager and I'm 
starting to be less interested reusing connections and just let them go 
away between requests. It tends to be the case that the requests are 
neither long lived nor numerous per HttpClient, I can live with the 
overhead of reconnecting if it means resources stay free between. How do 
I tune the client to accomplish this?

thanks,
Mark

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message