等一分钟
2023 年5 月 8 日 03:14
1
【 TiDB 使用环境】生产环境
【 TiDB 版本】 6.5.1
【遇到的问题:问题现象及影响】
SQLException异常:com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
【资源配置】
程序连接数据库配置
等一分钟
2023 年5 月 8 日 03:16
2
tidb:
datasource:
druid: url: jdbc:mysql://xxxx:4000/xxx?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
driver-class-name: com.mysql.jdbc.Driver
username: xxx
initialSize: 10
minIdle: 10
maxActive: 100
maxWait: 600000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
等一分钟
2023 年5 月 8 日 03:18
3
wait_timeout变量值 是 28800,tidb集群 是正常的,会是 连接被 timeout中断之后,程序再用报错了吗
Running
(Hacker Zs58i2 Gb)
2023 年5 月 8 日 05:14
4
如果用了链接池就把数据库层的waittimeout和connecttimeout去掉,另外可以设置下链接池的保活时间
等一分钟
2023 年5 月 8 日 05:15
5
waittimeout和connecttimeout,这怎么去掉啊
等一分钟
2023 年5 月 8 日 06:23
7
tidb的wait_timeout,28800秒,超时这个时间的sleep连接,会被 tidb kill 吧
等一分钟
2023 年5 月 8 日 08:52
12
minIdle: 10
maxActive: 100
连接池最大100个,AP类的应用应该不会
等一分钟
2023 年5 月 8 日 09:53
15
这个sleep时间这么长,是wait_timeout没有起作用吗