最近使用springboot2.0+hikari连接池,程序在过段时间访问数据库就会报下面错误:
2020-01-22 22:17:10 WARN PoolBase:176 - DateSourceHikariCP - Failed to validate connection com.mysql.jdbc.JDBC4Connection@6abdb43e (Communications link failure
The last packet successfully received from the server was 980,321 milliseconds ago. The last packet sent successfully to the server was 5,000 milliseconds ago.). Possibly consider using a shorter maxLifetime value.
2020-01-22 22:17:15 WARN PoolBase:176 - DateSourceHikariCP - Failed to validate connection com.mysql.jdbc.JDBC4Connection@4efcb030 (Communications link failure
The last packet successfully received from the server was 1,048,069 milliseconds ago. The last packet sent successfully to the server was 5,001 milliseconds ago.). Possibly consider using a shorter maxLifetime value.
2020-01-22 22:17:20 WARN PoolBase:176 - DateSourceHikariCP - Failed to validate connection com.mysql.jdbc.JDBC4Connection@49ba5a72 (Communicat