H2AccountPatchReviewStore: Set idle connection eviction time
If timeBetweenEvictionRunsMillis is not set, it defaults to -1, which means the thread doing eviction of idle connections will not run. Change-Id: I927c5a61ad9944bbe4b52f8ee39e9a6782c39f5b
This commit is contained in:
parent
114e9e3fc5
commit
e51b239f0f
@ -103,6 +103,9 @@ public class H2AccountPatchReviewStore
|
||||
datasource.setMaxActive(50);
|
||||
datasource.setMinIdle(4);
|
||||
datasource.setMaxIdle(16);
|
||||
long evictIdleTimeMs = 1000 * 60;
|
||||
datasource.setMinEvictableIdleTimeMillis(evictIdleTimeMs);
|
||||
datasource.setTimeBetweenEvictionRunsMillis(evictIdleTimeMs / 2);
|
||||
return datasource;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user