解决生产异常 Cause com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException Lock wait timeout exceed
·
1.情景复现
早上起来发现自己的错误日志提醒疯狂提示,错误如下:
; Lock wait timeout exceeded; try restarting transaction; nested exception is com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction

2.解决过程
我们使用Navicat或者直接用命令连接到我们的数据库
- 查看是否锁表
show PROCESSLISTbiji

-
kill掉锁表的进程

-
查看锁表进程
show OPEN TABLES WHERE in_use>0;

更多推荐
所有评论(0)