The last packet successfully received from the server was xxxxx milliseconds ago

文章讨论了在项目中遇到的Druid连接池MySQL数据库时的CommunicationsException错误,分析了配置参数如time-between-eviction-runs-millis和testWhileIdle的影响,以及如何平衡性能与连接的有效性检测。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

|2024-04-08 15:01:43.912|http-nio-80-exec-81|trace_id=64684ebdaf7585c81b5c3e302303cd5e|ERROR|com.alibaba.druid.pool.DruidPooledStatement|errorCheck|370|CommunicationsException, druid version 1.2.20, jdbcUrl : jdbc:mysql://192.188.200.200:4000/data_uc_sit_0001?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai&tinyInt1isBit=false, testWhileIdle true, idle millis 42977, minIdle 10, poolingCount 8, timeBetweenEvictionRunsMillis 60000, lastValidIdleMillis 42977, driver com.mysql.cj.jdbc.Driver, exceptionSorter com.alibaba.druid.pool.vendor.MySqlExceptionSorter
|2024-04-08 15:01:43.928|http-nio-80-exec-122|trace_id=6ae06d8d93c6ead4e4448a39327d46e7|ERROR|com.alibaba.druid.pool.DruidDataSource|handleFatalError|1988|{conn-59242} discard
|com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet successfully received from the server was 42,975 milliseconds ago. Th
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值