数据库Communications link failure

1.出现错误查询 Error querying , Communications link failure

#Error querying database.Cause:com.mysql.cj.jdbc.exceptions.CommunicationsException:Communications link failure
The last packet successfully received from the server was 10,016 milliseconds ago.
The last packet sent successfully to the server was 10,030 milliseconds ago.

image-20231117141600194

结合当时场景, 有很多查询到某一个表的任务都在进行中, 其他表查询正常, 只要涉及到该表的查询, 就会连接失败

2.使用的是MySQL数据库, 排查数据库查询超长连接

SELECT * FROM information_schema.processlist 
WHERE command = 'Sleep' AND time > 30;

当时发现有很多time在六七千, 占用连接,

数据库Communications link failure_第1张图片

3.直接KILL + ID释放掉, 后续连接正常

KILL ID

你可能感兴趣的:(数据库,oracle)