#mysql The last packet sent successfully to the server
The last packet successfully received from the server was 18,146 milliseconds ago. The last packet sent successfully to the server was 18,146 milliseconds ago.
com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:165) ~[mysql-connector-j-8.4.0.jar!/:8.4.0]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:55) ~[mysql-connector-j-8.4.0.jar!/:8.4.0]
at com.mysql.cj.jdbc.ConnectionImpl.setSessionMaxRows(ConnectionImpl.java:2594) ~[mysql-connector-j-8.4.0.jar!/:8.4.0]
at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:779) ~[mysql-connector-j-8.4.0.jar!/:8.4.0]
at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:681) ~[mysql-connector-j-8.4.0.jar!/:8.4.0]
at com.zaxxer.hikari.pool.PoolBase.isConnectionAlive(PoolBase.java:169) ~[HikariCP-4.0.3.jar!/:na]
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:186) ~[HikariCP-4.0.3.jar!/:na]
... 8 common frames omitted
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
The last packet successfully received from the server was 18,146 milliseconds ago.
单位是秒
SET GLOBAL wait_timeout = 28800;
SET GLOBAL interactive_timeout = 28800;
可以查看信息
SHOW VARIABLES LIKE 'wait_timeout';
SHOW VARIABLES LIKE 'interactive_timeout';