当前位置:网站首页>Lock wait timeout exceeded solution
Lock wait timeout exceeded solution
2022-07-30 15:13:00 【web18484626332】
[Err] 1205 - Lock wait timeout exceeded; try restarting transaction
Basic reason: The post-committed transaction waits for the previously processed transaction to release the lock, but when waiting exceeds the lock waiting time of mysql, this exception will be raised.
1. Find the locked statement by going to information_schema
information_schemaThis data table saves the information of all databases on the MySQL server.Such as database name, database table, table column data type and access rights.To put it simply, on this MySQL server, which databases are there, which tables are in each database, what are the field types of each table, what permissions are required for each database to access, and so on, the information is stored in the information_schema table.
mysql version before 8: information_schema
innodb_trxall currently running transactionsinnodb_lockscurrently present locksinnodb_lock_waitscorrespondence of lock waiting
select * from information_schema.innodb_trx;
select * from information_schema.innodb_locks;
select * from information_schema.innodb_locks_waits;
mysql version after 8.0: performance_schema
innodb_trxall currently running transactionsinnodb_lockscurrently present locksinnodb_lock_waitscorrespondence of lock waiting
select * from information_schema.innodb_trx;
select * from performance_schema.data_locks;
select * from performance_schema.data_lock_waits;
2. There is a lock in the query database
select * from information_schema.innodb_trx;
The record status is "RUNNING", that is, the transaction is being executed, and there is no lock

3. Show running threads
show full processlist;

Then find out the system id of the query statement: kill the locked thread id
kill 5
边栏推荐
- 新时代背景下智慧城市的建设与5G技术有何关联
- pytorch与keras的相互转换(代码以LeNet-5为例)
- Understand the Chisel language. 29. Chisel advanced communication state machine (1) - communication state machine: take the flash as an example
- Flink optimization
- 自动化办公|办公软件和亿图脑图MindMaster快捷键
- 华为再发「天才少年」召集令!曾放弃360万年薪的他也来首秀
- 吃透Chisel语言.29.Chisel进阶之通信状态机(一)——通信状态机:以闪光灯为例
- SSE for Web Message Push
- 如何写一份高可读性的软件工程设计文档
- 剑指 Offer II 037. 小行星碰撞
猜你喜欢

内容产品进化三板斧:流量、技术、产品形态

分布式前修课:MySQL实现分布式锁

机房布线的至高境界,美到窒息

Start learning C language

泡沫褪去,DeFi还剩下什么

MPSK抗噪声性能对比(即MPSK标准误码率曲线)

Teach you how to write an eye-catching software testing resume, if you don't receive an interview invitation, I will lose

ToDesk版本更新,引入RTC传输技术,是否早以替代向日葵远程控制?

开始学习C语言了

Interface automation framework, lm-easytest beta version released, use it quickly~
随机推荐
分布式前修课:MySQL实现分布式锁
内容产品进化三板斧:流量、技术、产品形态
泡沫褪去,DeFi还剩下什么
ECCV 2022 | 通往数据高效的Transformer目标检测器
有关收集箱的改进建议
机器学习在竞赛和工业界应用区别
Kubernetes应用管理深度剖析
canal抓取数据
Office Automation | Office Software and Edraw MindMaster Shortcuts
The website adds a live 2d kanban girl that can dress up and interact
Machine learning difference in the competition and industry application
v-model组件化编程应用
The highest level of wiring in the computer room, the beauty is suffocating
Allure Advanced - Dynamically Generate Report Content
The evolution of content products has three axes: traffic, technology, and product form
4位资深专家多年大厂经验分享出Flink技术内幕架构设计与实现原理
Flink实时数仓完结
PyQt5快速开发与实战 9.1 使用PyInstaller打包项目生成exe文件
Flink本地UI运行
时序数据库在船舶风险管理领域的应用