diff --git a/src/main/java/fr/xephi/authme/datasource/MySQL.java b/src/main/java/fr/xephi/authme/datasource/MySQL.java index b637259e..7ae8b6d5 100644 --- a/src/main/java/fr/xephi/authme/datasource/MySQL.java +++ b/src/main/java/fr/xephi/authme/datasource/MySQL.java @@ -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!");