mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2025-02-17 12:21:54 +01:00
Add failfast and reconnexion
This commit is contained in:
parent
d49b309301
commit
6b53afa731
@ -108,6 +108,8 @@ public class MySQL implements DataSource {
|
|||||||
config.addDataSourceProperty("cachePrepStmts", "true");
|
config.addDataSourceProperty("cachePrepStmts", "true");
|
||||||
config.addDataSourceProperty("prepStmtCacheSize", "250");
|
config.addDataSourceProperty("prepStmtCacheSize", "250");
|
||||||
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
|
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
|
||||||
|
config.addDataSourceProperty("autoReconnect", true);
|
||||||
|
config.addDataSourceProperty("initializationFailFast", true);
|
||||||
ds = new HikariDataSource(config);
|
ds = new HikariDataSource(config);
|
||||||
ConsoleLogger.info("Connection pool ready");
|
ConsoleLogger.info("Connection pool ready");
|
||||||
}
|
}
|
||||||
@ -896,6 +898,8 @@ public class MySQL implements DataSource {
|
|||||||
config.addDataSourceProperty("cachePrepStmts", "true");
|
config.addDataSourceProperty("cachePrepStmts", "true");
|
||||||
config.addDataSourceProperty("prepStmtCacheSize", "250");
|
config.addDataSourceProperty("prepStmtCacheSize", "250");
|
||||||
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
|
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
|
||||||
|
config.addDataSourceProperty("autoReconnect", true);
|
||||||
|
config.addDataSourceProperty("initializationFailFast", true);
|
||||||
ds = new HikariDataSource(config);
|
ds = new HikariDataSource(config);
|
||||||
if (!reload)
|
if (!reload)
|
||||||
ConsoleLogger.info("ConnectionPool was unavailable... Reconnected!");
|
ConsoleLogger.info("ConnectionPool was unavailable... Reconnected!");
|
||||||
|
Loading…
Reference in New Issue
Block a user