当前位置:网站首页>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即可解决。
边栏推荐
- 图嵌入Graph embedding学习笔记
- ICTCLAS用的字Lucene4.9捆绑
- 浅浅的谈一下ThreadLocalInsecureRandom
- S7-200smart uses V90 Modbus communication control library to control the specific methods and steps of V90 servo
- [quick start of Digital IC Verification] 1. Talk about Digital IC Verification, understand the contents of the column, and clarify the learning objectives
- Build your own website (16)
- Leetcode brush questions: binary tree 18 (largest binary tree)
- 《乔布斯传》英文原著重点词汇笔记(十二)【 chapter ten & eleven】
- C language OJ gets PE, OJ of ACM introduction~
- Wechat applet regular expression extraction link
猜你喜欢
![Scala basics [HelloWorld code parsing, variables and identifiers]](/img/75/1d89581b9b8299ffb55d95514e6df4.png)
Scala basics [HelloWorld code parsing, variables and identifiers]
![[quick start of Digital IC Verification] 6. Quick start of questasim (taking the design and verification of full adder as an example)](/img/6d/110b87747f0a4be52da9fd49a05b82.png)
[quick start of Digital IC Verification] 6. Quick start of questasim (taking the design and verification of full adder as an example)

Unity编辑器扩展 UI控件篇

深度學習 卷積神經網絡(CNN)基礎

微信小程序正则表达式提取链接

【数字IC验证快速入门】7、验证岗位中必备的数字电路基础知识(含常见面试题)

【数字IC验证快速入门】6、Questasim 快速上手使用(以全加器设计与验证为例)

Unity editor extended UI control

【数字IC验证快速入门】8、数字IC中的典型电路及其对应的Verilog描述方法

leetcode刷题:二叉树15(找树左下角的值)
随机推荐
【c语言】归并排序
leetcode刷题:二叉树16(路径总和)
ByteDance dev better technology salon was successfully held, and we joined hands with Huatai to share our experience in improving the efficiency of web research and development
Debezium series: parsing the default value character set
model方法
解决Thinkphp框架应用目录下数据库配置信息修改后依然按默认方式连接
Parler de threadlocal insecurerandom
Leetcode skimming: binary tree 16 (path sum)
y57.第三章 Kubernetes从入门到精通 -- 业务镜像版本升级及回滚(三十)
计算lnx的一种方式
处理文件和目录名
Is the education of caiqiantang reliable and safe?
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
B站UP搭建世界首个纯红石神经网络、基于深度学习动作识别的色情检测、陈天奇《机器学编译MLC》课程进展、AI前沿论文 | ShowMeAI资讯日报 #07.05
走入并行的世界
[quick start of Digital IC Verification] 6. Quick start of questasim (taking the design and verification of full adder as an example)
C langue OJ obtenir PE, ACM démarrer OJ
强化学习-学习笔记4 | Actor-Critic
微信小程序正则表达式提取链接
实操演示:产研团队如何高效构建需求工作流?