当前位置:网站首页>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
边栏推荐
- 去腾讯面试,直接让人出门左拐 :幂等性都不知道!
- Smart Contract Security - Private Data Access
- Eight years of testing experience, why was the leader criticized: the test documents you wrote are not as good as those of fresh graduates
- Androd 跳转到google应用市场
- JUC常见的线程池源码学习 02 ( ThreadPoolExecutor 线程池 )
- What is the relationship between the construction of smart cities and 5G technology in the new era
- [深入研究4G/5G/6G专题-46]: 5G Link Adaption链路自适应-2-常见缩略语
- Why do software testing have to learn automation?Talk about the value of automated testing in my eyes
- [In-depth study of 4G/5G/6G topic-46]: 5G Link Adaption Link Adaption-2-Common Abbreviations
- MaxWell scraped data
猜你喜欢

吃透Chisel语言.29.Chisel进阶之通信状态机(一)——通信状态机:以闪光灯为例

Lock wait timeout exceeded解决方案

Office Automation | Office Software and Edraw MindMaster Shortcuts

【回归预测-CNN预测】基于卷积神经网络CNN实现数据回归预测附matlab代码

关于容器的小案例

The evolution of content products has three axes: traffic, technology, and product form

Smart Contract Security - Private Data Access

学习 MySQL 需要知道的 28 个小技巧

阿里CTO程立:阿里巴巴的开源历程、理念和实践

5. DOM
随机推荐
ToDesk版本更新,引入RTC传输技术,是否早以替代向日葵远程控制?
Chapter6 : Has Artificial Intelligence Impacted Drug Discovery?
71页全域旅游综合整体解决方案2021 ppt
异常情况处置方案
The truth of the industry: I will only test those that have no future, and I panic...
Androd 跳转到google应用市场
SSE for Web Message Push
Eclipse connects to SQL server database "recommended collection"
A simple change for problem, knapsack problem sets of shell
开源工具推荐:高性能计算辅助工具MegPeak
Still saying software testing doesn't have a midlife crisis?9 years of test engineers were eliminated
ESP32 Repeated Reboot Issue Arduino Shield Power Outage Detector
CVE-2022-33891 Apache Spark 命令注入复现
ddl and dml in sql (the difference between sql and access)
元宇宙邮局AI航天主题系列数字藏品 将于7月30日10:00点上线“元邮数藏”
PyQt5快速开发与实战 9.1 使用PyInstaller打包项目生成exe文件
Why did I switch from developer to testing, 3 years software testing engineer, tell you the secret of this
这个编辑器居然号称快如闪电!
如何在 TiDB Cloud 上使用 Databricks 进行数据分析 | TiDB Cloud 使用指南
使用bat脚本以json格式导出mongo数据库中指定表数据