Set Hikari maxLifetime to 5m, keepaliveTime to 1m (fixes #199)

This commit is contained in:
Intelli 2022-09-26 15:22:07 -06:00
parent fcd789ef5b
commit 9f8c2e8a2f

View File

@ -229,6 +229,8 @@ public class ConfigHandler extends Queue {
config.setJdbcUrl("jdbc:mysql://" + ConfigHandler.host + ":" + ConfigHandler.port + "/" + ConfigHandler.database);
config.setUsername(ConfigHandler.username);
config.setPassword(ConfigHandler.password);
config.setMaxLifetime(300000);
config.setKeepaliveTime(60000);
config.addDataSourceProperty("characterEncoding", "UTF-8");
config.addDataSourceProperty("connectionTimeout", "10000");
/* https://github.com/brettwooldridge/HikariCP/wiki/MySQL-Configuration */