commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Krueger <a...@trigonic.com>
Subject Re: [pool] how to put a hard limit on idle time?
Date Sat, 29 Jan 2011 16:54:04 GMT
On 1/28/2011 6:18 PM, Phil Steitz wrote:

> The requirement to only hold instances for 5 seconds is a pretty
> severe limitation that will limit the value of the pool.  If there is
> any way to engineer the instances so that they can tolerate longer
> inactivity periods, you will get more value from the pool.
Essentially, we're attempting to pool open socket connections to a TCP 
server.  This server is completely outside our control and is really 
overloaded.  The maintainers of this server have this really bizarre 
timeout whereby connections that are idle for 5 seconds for any reason 
(even waiting for a response from THEIR end) are killed with extreme 
prejudice.  We're attempting to alleviate the matter by radically 
reducing the number of open connections we make to that server by 
pooling and reusing connections, but their aggressive timeout remains.  
We're in agreement that this timeout is ill-conceived, but we're 
definitely not in a position to dictate terms to the owners of the 
server in question.

We're trying to use the pool settings to evict sockets that may be close 
to hitting this timeout, or have already hit it, and this works fine 
with our mock server.  However, we've seen under testing with the 
external server that the eviction thread isn't always culling them soon 
enough.

We may try your suggestion to manage timestamps ourselves outside the 
pool in the short term, since we're completing this particular sprint in 
the middle of next week.

Thanks much,
Alan Krueger

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message