On Mon, 2007-11-12 at 13:43 -0800, Pankaj Arora wrote: > Hi, > > 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 > thread > > I do closeIdleConnections(20*1000). Please do tell if anything else > needs to be done for this solution. >
You may want to close idle connections more aggressively or simply close all idle connections (#closeIdleConnections(0)) if you expect a long period of inactivity. Hope this helps Oleg > 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. > > Thanks, > Pankaj Arora > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
