[ https://issues.apache.org/jira/browse/POOL-353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary D. Gregory updated POOL-353: --------------------------------- Fix Version/s: (was: 2.8.1) 2.8.2 > Return false if current connection count is less then MinIdle in > DefaultEvictionPolicy > -------------------------------------------------------------------------------------- > > Key: POOL-353 > URL: https://issues.apache.org/jira/browse/POOL-353 > Project: Commons Pool > Issue Type: Improvement > Affects Versions: 2.6.0 > Reporter: jefferyyuan > Assignee: Mark Struberg > Priority: Minor > Fix For: 3.0, 2.8.2 > > > At > [https://github.com/apache/commons-pool/blob/master/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java#L1140] > It first evicts idle connections, then re-creates idle instances to > ensureMinIdle. > DefaultEvictionPolicy will close idle connection even when there is <= > MinIdle connections. > https://github.com/apache/commons-pool/blob/master/src/main/java/org/apache/commons/pool2/impl/DefaultEvictionPolicy.java > > In case minIdle is set to large, it would causes problems like frequent full > GC. > * the connection related objects are promoted and stored in old gen, then > evict will close them and make it gc-able, and ensureMinIdle will create new > connections which will be eventually promoted to old gen and gc-able again. > * Old gen will grow quickly and need full gc. > We can solve the problem if we always keep minIdle connections in the > DefaultEvictionPolicy. > Or at least add doc to DefaultEvictionPolicy and may provide another > EvictionPolicy which returns false if current connection count is less then > MinIdle and refer it in DefaultEvictionPolicy. -- This message was sent by Atlassian Jira (v8.3.4#803005)