Reduced MySQL connection lifetime from 5m to 1m (fix #362)

This commit is contained in:
Intelli 2023-07-13 18:07:15 -06:00
parent 1a06e6a6bf
commit d7b76135c8

View File

@ -230,8 +230,7 @@ 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.setMaxLifetime(60000);
config.addDataSourceProperty("characterEncoding", "UTF-8");
config.addDataSourceProperty("connectionTimeout", "10000");
/* https://github.com/brettwooldridge/HikariCP/wiki/MySQL-Configuration */