开发者社区> 问答> 正文

mysql : Communications link failure报错异常

软件环境:mysql 5.5.25
应用使用数据库连接池 c3p0
经常会发生如下异常:
Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet successfully received from the server was 149,464 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.
请帮忙看下,是什么导致这个异常发生的。

展开
收起
落地花开啦 2016-02-13 17:32:11 12135 0
1 条回答
写回答
取消 提交回答
  • c3p0 连接池如果默认情况下8小时候就会被数据库踢掉空闲链接,但是链接尺中可能还在,当时候时候就发现连不上。

    2019-07-17 18:42:15
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
搭建电商项目架构连接MySQL 立即下载
搭建4层电商项目架构,实战连接MySQL 立即下载
PolarDB MySQL引擎重磅功能及产品能力盛大发布 立即下载

相关镜像