mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-09 04:02:10 +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("prepStmtCacheSize", "250");
|
||||
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
|
||||
config.addDataSourceProperty("autoReconnect", true);
|
||||
config.addDataSourceProperty("initializationFailFast", true);
|
||||
ds = new HikariDataSource(config);
|
||||
ConsoleLogger.info("Connection pool ready");
|
||||
}
|
||||
@ -896,6 +898,8 @@ public class MySQL implements DataSource {
|
||||
config.addDataSourceProperty("cachePrepStmts", "true");
|
||||
config.addDataSourceProperty("prepStmtCacheSize", "250");
|
||||
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
|
||||
config.addDataSourceProperty("autoReconnect", true);
|
||||
config.addDataSourceProperty("initializationFailFast", true);
|
||||
ds = new HikariDataSource(config);
|
||||
if (!reload)
|
||||
ConsoleLogger.info("ConnectionPool was unavailable... Reconnected!");
|
||||
|
Loading…
Reference in New Issue
Block a user