nkallen/querulous — Issue #24: Connection pooling seems to be broken
Author: vhazrati
Created: 2011-10-31 06:41:14+00:00
State: open

We have this object from which we are fetching our queryEvaluator

object MyDataSource {
val queryFactory = new SqlQueryFactory
val apachePoolingDatabaseFactory = new ApachePoolingDatabaseFactory(
"SELECT 1",
10,
10,
new Duration(1000),
new Duration(10),
true,
new Duration(30000))
val queryEvaluatorFactory = new StandardQueryEvaluatorFactory(apachePoolingDatabaseFactory, queryFactory)
val queryEvaluator = queryEvaluatorFactory(dbConfig.driverClassName, dbConfig.url, dbConfig.username, dbConfig.password)
}

We are not explicitly closing connections, assuming that it is handled. We seem to be running out of connections on our MySQL db.

We are using the following dependencies

libraryDependencies += "com.twitter" % "querulous" % "1.2.0-generic"

libraryDependencies += "mysql" % "mysql-connector-java" % "5.1.12"