HikariCP配置max-lifetime
参考链接:https://github.com/brettwooldridge/HikariCP/issues/1651异常日志com.zaxxer.hikari.pool.PoolBase HikariCP - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@714c2113 (No operations allowe
·
参考链接:https://github.com/brettwooldridge/HikariCP/issues/1651
异常日志
com.zaxxer.hikari.pool.PoolBase HikariCP - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@714c2113 (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value.
解决方案
- 从源码看到
max-lifetime
默认值是30minute
- 修改HikariCP配置项
max-lifetime
– 作者建议修改为30min、10min,但结合max-lifetime
与idle
、connectionTimeout
的值,最终我配置为2minute才解决该异常
更多推荐
已为社区贡献2条内容
所有评论(0)