You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HikariConfig hikariConfig = new HikariConfig();
hikariConfig.setDriverClassName(dataSourceProperties.getDriver());
hikariConfig.setUsername(dataSourceProperties.getUsername());
hikariConfig.setPassword(dataSourceProperties.getPassword());
hikariConfig.setJdbcUrl(jdbcUrl);
hikariConfig.setMaximumPoolSize(1);
hikariConfig.setMinimumIdle(0);
hikariConfig.setIdleTimeout(5000); //5 Seconds
return new HikariDataSource(hikariConfig);
MySQL 8 wait_timeout = 30 //30 Seconds
As my understanding HikariCP with Spring Boot and MySQL 8, the ideal connection should be removed after 5 seconds, when I check PROCESSLIST in the MySQL it is alive for 30 seconds which is the wait_timout of the MySQL connection.
Scenario 1
Spring Boot 2.6.3
MySQL 8
wait_timeout = 30 //30 Seconds
As my understanding HikariCP with Spring Boot and MySQL 8, the ideal connection should be removed after 5 seconds, when I check
PROCESSLIST
in the MySQL it is alive for 30 seconds which is thewait_timout
of the MySQL connection.Scenario 2
hikariConfig.setKeepaliveTime(40000); //40 Seconds
The connection should be alive for 40 seconds but removed in 30 seconds which is the
wait_timout
of the MySQL connection.The text was updated successfully, but these errors were encountered: