【发布时间】:2021-08-06 11:45:10
【问题描述】:
我正在使用 drop-wizard 和 mysql 5.6。每当查询花费超过 2 秒时,我都会不断收到此异常。
org.skife.jdbi.v2.exceptions.UnableToExecuteStatementException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet successfully received from the server was 2,002 milliseconds ago.
我已将@QueryTimeOut 设置为 4s。连接中断的原因可能是什么?
【问题讨论】:
-
请发布minimal reproducible example 和完整的异常堆栈跟踪。
标签: mysql jdbc dropwizard hikaricp jdbi