mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-09 04:02:10 +01:00
Define a max life time of a pool
This commit is contained in:
parent
b84d96360e
commit
86e1b8df7c
@ -121,6 +121,7 @@ public class MySQL implements DataSource {
|
|||||||
config.addDataSourceProperty("prepStmtCacheSize", "250");
|
config.addDataSourceProperty("prepStmtCacheSize", "250");
|
||||||
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
|
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
|
||||||
config.addDataSourceProperty("autoReconnect", true);
|
config.addDataSourceProperty("autoReconnect", true);
|
||||||
|
config.setMaxLifetime(12000);
|
||||||
config.setInitializationFailFast(false);
|
config.setInitializationFailFast(false);
|
||||||
ds = new HikariDataSource(config);
|
ds = new HikariDataSource(config);
|
||||||
ConsoleLogger.info("Connection pool ready");
|
ConsoleLogger.info("Connection pool ready");
|
||||||
@ -914,6 +915,7 @@ public class MySQL implements DataSource {
|
|||||||
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
|
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
|
||||||
config.addDataSourceProperty("autoReconnect", true);
|
config.addDataSourceProperty("autoReconnect", true);
|
||||||
config.setInitializationFailFast(false);
|
config.setInitializationFailFast(false);
|
||||||
|
config.setMaxLifetime(12000);
|
||||||
config.setPoolName("AuthMeMYSQLPool");
|
config.setPoolName("AuthMeMYSQLPool");
|
||||||
ds = new HikariDataSource(config);
|
ds = new HikariDataSource(config);
|
||||||
if (!reload)
|
if (!reload)
|
||||||
|
Loading…
Reference in New Issue
Block a user