【 TiDB 使用环境】
TiDB版本:5.2.0
HAProxy(主机名:jhmk08):
服务器硬件:
10.160.60.18 Cpu 40核,256G内存,机械硬盘
10.160.60.19 Cpu 40核,256G内存,机械硬盘
10.160.60.20 Cpu 40核,256G内存,机械硬盘
【概述】 场景 + 问题概述
通过JDBC(使用HAproxy)批量写入TiDB断开频率较高。
发现TiDB有自动重启现象:
http://10.160.60.19:2379/dashboard/api/diagnose/reports/92b6b872-8698-4541-b792-b7789f1af280/detailc
【TiDB 版本】
TiDB版本:5.2.0
【附件】 相关日志及监控(https://metricstool.pingcap.com/)
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
The last packet successfully received from the server was 15,400 milliseconds ago. The last packet sent successfully to the server was 15,400 milliseconds ago.
at sun.reflect.GeneratedConstructorAccessor138.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:539)
at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:703)
at com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:642)
at com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:128)
at com.mysql.cj.NativeSession.sendCommand(NativeSession.java:311)
at com.mysql.cj.ServerPreparedQuery.sendExecutePacket(ServerPreparedQuery.java:336)
at com.mysql.cj.ServerPreparedQuery.serverExecute(ServerPreparedQuery.java:207)
at com.mysql.cj.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:635)
... 27 common frames omitted
Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
at com.mysql.cj.protocol.FullReadInputStream.readFully(FullReadInputStream.java:67)
at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:63)
at com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:45)
at com.mysql.cj.protocol.a.TimeTrackingPacketReader.readHeader(TimeTrackingPacketReader.java:52)
at com.mysql.cj.protocol.a.TimeTrackingPacketReader.readHeader(TimeTrackingPacketReader.java:41)
at com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:54)
at com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:44)
at com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:533)
... 34 common frames omitted