Permalink
Browse files

Set hikariCP validationTimeout from config or 1000ms

- Fixes #1140
  • Loading branch information...
easel committed Jun 23, 2015
1 parent 9b58a50 commit 95dad0a2b1f3fee09b775958b11cb36be05adaa1
@@ -168,8 +168,10 @@ trait JdbcBackend extends RelationalBackend {
* of connections to keep in the pool.</li>
* <li>`connectionTimeout` (Duration, optional, default: 1s): The maximum time to wait
* before a call to getConnection is timed out. If this time is exceeded without a
* connection becoming available, a SQLException will be thrown. 100ms is the minimum
* connection becoming available, a SQLException will be thrown. 1000ms is the minimum
* value.</li>
* <li>`validationTimeout` (Duration, optional, default: 1s): The maximum amount of time
* that a connection will be tested for aliveness. 1000ms is the minimum value.</li>
* <li>`idleTimeout` (Duration, optional, default: 10min): The maximum amount
* of time that a connection is allowed to sit idle in the pool. A value of 0 means that
* idle connections are never removed from the pool.</li>
@@ -150,6 +150,7 @@ object HikariCPJdbcDataSource extends JdbcDataSourceFactory {
// Pool configuration
hconf.setConnectionTimeout(c.getMillisecondsOr("connectionTimeout", 1000))
hconf.setValidationTimeout(c.getMillisecondsOr("validationTimeout", 1000))
hconf.setIdleTimeout(c.getMillisecondsOr("idleTimeout", 600000))
hconf.setMaxLifetime(c.getMillisecondsOr("maxLifetime", 1800000))
hconf.setLeakDetectionThreshold(c.getMillisecondsOr("leakDetectionThreshold", 0))

0 comments on commit 95dad0a

Please sign in to comment.