当前位置:网站首页>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 language OJ gets PE, OJ of ACM introduction~
- 秋招字节面试官问你还有什么问题?其实你已经踩雷了
- 信息学奥赛一本通 1338:【例3-3】医院设置 | 洛谷 P1364 医院设置
- Interviewer: what is the internal implementation of set data types in redis?
- 深度學習 卷積神經網絡(CNN)基礎
- [quick start of Digital IC Verification] 3. Introduction to the whole process of Digital IC Design
- 走入并行的世界
- leetcode刷题:二叉树10(完全二叉树的节点个数)
- Go language | 03 array, pointer, slice usage
- 炒股开户最低佣金,低佣金开户去哪里手机上开户安全吗
猜你喜欢
leetcode刷题:二叉树10(完全二叉树的节点个数)
Wechat applet regular expression extraction link
Elk distributed log analysis system deployment (Huawei cloud)
Securerandom things | true and false random numbers
js实现禁止网页缩放(Ctrl+鼠标、+、-缩放有效亲测)
[quick start to digital IC Verification] 8. Typical circuits in digital ICs and their corresponding Verilog description methods
Jvmrandom cannot set seeds | problem tracing | source code tracing
无卷积骨干网络:金字塔Transformer,提升目标检测/分割等任务精度(附源代码)...
About the priority of Bram IP reset
Oracle tablespace management
随机推荐
BZOJ 3747 POI2015 Kinoman 段树
处理文件和目录名
Oracle tablespace management
.Net分布式事务及落地解决方案
计算lnx的一种方式
信息学奥赛一本通 1337:【例3-2】单词查找树 | 洛谷 P5755 [NOI2000] 单词查找树
信息学奥赛一本通 1340:【例3-5】扩展二叉树
解决Thinkphp框架应用目录下数据库配置信息修改后依然按默认方式连接
Convolution free backbone network: Pyramid transformer to improve the accuracy of target detection / segmentation and other tasks (with source code)
Leetcode(695)——岛屿的最大面积
Is the education of caiqiantang reliable and safe?
Debezium series: modify the source code to support drop foreign key if exists FK
JS implementation prohibits web page zooming (ctrl+ mouse, +, - zooming effective pro test)
怎么挑选好的外盘平台,安全正规的?
基础篇——配置文件解析
信息学奥赛一本通 1338:【例3-3】医院设置 | 洛谷 P1364 医院设置
Solve the problem that the database configuration information under the ThinkPHP framework application directory is still connected by default after modification
selenium 元素信息
淺淺的談一下ThreadLocalInsecureRandom
本季度干货导航 | 2022年Q2