hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: [jira] Commented: (HTTPCLIENT-1012) ThreadSafeClientConnManager Connection pool leak issue
Date Thu, 14 Oct 2010 20:27:20 GMT
On Thu, 2010-10-14 at 07:39 -0700, SomuReddy wrote:
> 
> Thanks Oleg, hope I'm replying now from right place.,
> 
> Few things, we are using the F5 load balancer between back end servers and
> our application. So our application is going to send http request to load
> balancer not directly to back end server.
> 
> So do we need to take any special care when we are using the HttpClient to
> send http request to Load Balancer in terms of connection pool?
> 

Nothing I can think of.


> FYI.. Some times we won't get the response from back end servers due to some
> data problems so we see lot of 500 status exceptions from servers. when we
> got bunch of these exceptions.. we are seeing the 'Timeout waiting for
> connection' because there is no free connection left in pool. though we are
> doing abort() and consumeContent() when we got any exception..  
> 

You can monitor activities of the connection manager by turning on just
a small number of log categories as described in the logging guide. It
should be fairly easy to see whether or not the connection gets released
back to the pool in case of an exception.


> but we never use closeExpiryConnections(), is it worth to call this method
> when we got exception?
> 

I do not think so.


> can you suggest any other things we need to take care when we are using  the
> Http4.0.3 Cooonectionpool (ThreadSafeClientConnManager)  to work efficiency
> manner?
> 
> Thanks..
> 
> 

Make sure your thread pool and the connection pool are sized
consistently. If you have too many worker threads contesting for a much
smaller number of connections in the pool you are bound to have
ConnectionPoolTimeoutException

Hope this helps

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message