hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pankaj Arora" <par...@castiron.com>
Subject Close_Wait problem
Date Mon, 12 Nov 2007 21:43:36 GMT

I am using Http Commons to implement my http client and observe that
after running the client for large number of request connections are
left in close_wait stage. I searched through archives and noticed that
following were suggested:


1. Reuse instances of HttpClient or the associated  
HttpConnectionManager, this may have threading implications.
I do that.
2. Do closeidleConnections(long timeout) or customIdleConnectionTimeout
I do closeIdleConnections(20*1000). Please do tell if anything else
needs to be done for this solution.
3. Add a "Connection: close" and/or "Proxy-Connection: close" header to

all methods.  This should work in most cases, assuming that the server  
echoes the header in the response.
I don't want to do this as can't take the performance hit.
Is there any other way or do I need to do anything else in first 2
solutions so that it works for me.
I am using a Jetty based server for the response side.
Pankaj Arora


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