commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sarath Ambadas <sarath.amba...@gmail.com>
Subject [pool] connections getting destroyed immediately if more than Max Idle
Date Fri, 05 Aug 2011 05:50:16 GMT
Hi
I am using commons pool for pooling my connections in my application.
I set the pool config properties as given below
Max Active = 25
Max Idle = 1
MinEvictableIdleTimeMillis = 1 hours
TimeBetweenEvictionRunsMillis = 10 min
MaxWait = 5 min

When I do some load testing, more connections get created, but all the
connections get destroyed(as soon as returned to the pool) immediately
except 1 (Max Idle what ever value it has). I was thinking even if there are
more connections than MaxIdle (but less than Max Active), the connections
will be present in the pool and they will be destroyed only when
MinEvictableIdleTimeMillis is reached.

Could anyone please clarify this. Can I achieve this functionality where
connections wont get destroyed immediately if there are more than MaxIdle
but will stay in pool till timeout.

Thanks much
Sarath

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