当前位置:网站首页>Mysql频繁操作出现锁表问题
Mysql频繁操作出现锁表问题
2022-07-05 20:14:00 【幼儿园里的山大王】
一、报错现象
org.springframework.dao.CannotAcquireLockException:
### Error updating database. Cause: com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction这个错误是由于有线程或者是有其他操作在频繁的操作mysql数据库导致表被锁了。
二、解决方式
1、在数据库中执行下面语句。
SELECT * FROM INFORMATION_SCHEMA.INNODB_TRX;会出现

2、然后找到 trx_mysql_thread_id 列
使用kill id;删除掉对应线程id即可解决。
边栏推荐
- 【c语言】快速排序的三种实现以及优化细节
- [quick start of Digital IC Verification] 6. Quick start of questasim (taking the design and verification of full adder as an example)
- 浅浅的谈一下ThreadLocalInsecureRandom
- A solution to PHP's inability to convert strings into JSON
- 解决Thinkphp框架应用目录下数据库配置信息修改后依然按默认方式连接
- 期货如何网上开户?安不安全?
- 信息学奥赛一本通 1337:【例3-2】单词查找树 | 洛谷 P5755 [NOI2000] 单词查找树
- ICTCLAS word Lucene 4.9 binding
- July 4, 2022 - July 10, 2022 (UE4 video tutorial MySQL)
- Autumn byte interviewer asked you any questions? In fact, you have stepped on thunder
猜你喜欢

leetcode刷题:二叉树10(完全二叉树的节点个数)

Based on vs2017 and cmake GUI configuration, zxing and opencv are used in win10 x64 environment, and simple detection of data matrix code is realized

Autumn byte interviewer asked you any questions? In fact, you have stepped on thunder

Leetcode brush question: binary tree 13 (the same tree)

Wechat applet regular expression extraction link

Leetcode brush questions: binary tree 11 (balanced binary tree)

.Net分布式事务及落地解决方案

S7-200smart uses V90 Modbus communication control library to control the specific methods and steps of V90 servo

About the priority of Bram IP reset

解决Thinkphp框架应用目录下数据库配置信息修改后依然按默认方式连接
随机推荐
Flume series: interceptor filtering data
Elk distributed log analysis system deployment (Huawei cloud)
DP: tree DP
处理文件和目录名
1: Citation;
Codeforces Round #804 (Div. 2) - A, B, C
Leetcode: binary tree 15 (find the value in the lower left corner of the tree)
Securerandom things | true and false random numbers
leetcode刷题:二叉树15(找树左下角的值)
[quick start of Digital IC Verification] 9. Finite state machine (FSM) necessary for Verilog RTL design
股票开户哪里好?网上客户经理开户安全吗
leetcode刷题:二叉树13(相同的树)
14. Users, groups, and permissions (14)
信息学奥赛一本通 1339:【例3-4】求后序遍历 | 洛谷 P1827 [USACO3.4] 美国血统 American Heritage
关于BRAM IP复位的优先级
Is it safe for Galaxy Securities to open an account online?
B站UP搭建世界首个纯红石神经网络、基于深度学习动作识别的色情检测、陈天奇《机器学编译MLC》课程进展、AI前沿论文 | ShowMeAI资讯日报 #07.05
leetcode刷题:二叉树18(最大二叉树)
c語言oj得pe,ACM入門之OJ~
ROS2专题【01】:win10上安装ROS2