当前位置:网站首页>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_schema
This 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_trx
all currently running transactionsinnodb_locks
currently present locksinnodb_lock_waits
correspondence 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_trx
all currently running transactionsinnodb_locks
currently present locksinnodb_lock_waits
correspondence 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
边栏推荐
- 三电系统集成技术杂谈
- canal scrape data
- Allure进阶-动态生成报告内容
- SQL 优化这么做就对了!
- Digital signal processing course lab report (what foundation is needed for digital signal processing)
- ECCV 2022 | Towards Data Efficient Transformer Object Detectors
- 有关收集箱的改进建议
- Chapter6 : Has Artificial Intelligence Impacted Drug Discovery?
- Mac 中 MySQL 的安装与卸载
- MPSK抗噪声性能对比(即MPSK标准误码率曲线)
猜你喜欢
自动化办公|办公软件和亿图脑图MindMaster快捷键
Metaverse Post Office AI space-themed series of digital collections will be launched at 10:00 on July 30th "Yuanyou Digital Collection"
算力顶天地,存力纳乾坤:国家超级计算济南中心的一体两面
The highest level of wiring in the computer room, the beauty is suffocating
This editor actually claims to be as fast as lightning!
三电系统集成技术杂谈
Flask Framework - Flask-Mail Mail
Remember an experience of interviewing an outsourcing company, should you go?
71页全域旅游综合整体解决方案2021 ppt
canal抓取数据
随机推荐
浅析显卡市场的未来走向:现在可以抄底了吗?
Flink实时数仓完结
【元胞自动机】基于元胞自动机模拟生命演化、病毒感染等实例附matlab代码
SLF4J的使用
Ts是什么?
71页全域旅游综合整体解决方案2021 ppt
Understand the Chisel language. 29. Chisel advanced communication state machine (1) - communication state machine: take the flash as an example
如何写一份高可读性的软件工程设计文档
[Enlightenment by Opportunity-53]: "Sushu"-3- Self-cultivation and Self-cultivation
Flask框架——Flask-SQLite数据库
JSON常用注解
5G-based Warehousing Informatization Solution 2022
1222. 可以攻击国王的皇后-力扣双百代码
MongoDB启动报错 Process: 29784 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=14)
新时代背景下智慧城市的建设与5G技术有何关联
Use of SLF4J
双碳目标下:农田温室气体排放模拟
Office Automation | Office Software and Edraw MindMaster Shortcuts
Flask Framework - Flask-Mail Mail
Hello,World