querulous icon indicating copy to clipboard operation
querulous copied to clipboard

ApacheConnectionPool's testWhileIdle is false and not configurable

Open tachim opened this issue 12 years ago • 0 comments

On line 55 of https://github.com/nkallen/querulous/blob/master/src/main/scala/com/twitter/querulous/database/ApachePoolingDatabase.scala, config.testWhileIdle is set to false. According to http://commons.apache.org/pool/apidocs/org/apache/commons/pool/impl/GenericObjectPool.html, this means that timeBetweenEvictionRunsMillis has no effect, the connections are never checked when idle, and the pool sometimes returns invalid connections.

Is there a reason to not let this be configurable (or at least default to true)?

tachim avatar Aug 26 '11 23:08 tachim