当前位置:网站首页>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
边栏推荐
- [In-depth study of 4G/5G/6G topic-46]: 5G Link Adaption Link Adaption-2-Common Abbreviations
- 5G-based Warehousing Informatization Solution 2022
- 关于MySQL主从复制的数据同步延迟问题
- JUC常见的线程池源码学习 02 ( ThreadPoolExecutor 线程池 )
- Why did I switch from developer to testing, 3 years software testing engineer, tell you the secret of this
- What is the relationship between the construction of smart cities and 5G technology in the new era
- [Enlightenment by Opportunity-53]: "Sushu"-3- Self-cultivation and Self-cultivation
- 1222. 可以攻击国王的皇后-力扣双百代码
- 00 testers of seasoning after nearly a year, whether to change careers or to learn the software testing students summarized the following heart advice
- Androd 跳转到google应用市场
猜你喜欢

容器排序案例

A Small Case About Containers

DocuWare 文件管理与工作流程自动化案例研究——DocuWare 工作流程功能使在家工作的员工能够保持沟通和高效工作,支持混合环境

Go to Tencent for an interview and let people turn left directly: I don't know idempotency!

如何在 TiDB Cloud 上使用 Databricks 进行数据分析 | TiDB Cloud 使用指南

Mac 中 MySQL 的安装与卸载

从实例来看DAO:权力分散的伟大尝试

ECCV 2022 | Towards Data Efficient Transformer Object Detectors

Recommended open source tools: MegPeak, a high-performance computing tool

Eight years of testing experience, why was the leader criticized: the test documents you wrote are not as good as those of fresh graduates
随机推荐
pytorch与keras的相互转换(代码以LeNet-5为例)
机房布线的至高境界,美到窒息
深入浅出零钱兑换问题——背包问题的套壳
新时代背景下智慧城市的建设与5G技术有何关联
postgresql的普通字符串和转义字符串
Machine learning difference in the competition and industry application
Flink real-time data warehouse completed
Web消息推送之SSE
A simple change for problem, knapsack problem sets of shell
Flask Framework - Sijax
获取Google Advertising ID作为唯一识别码
使用bat脚本以json格式导出mongo数据库中指定表数据
The highest level of wiring in the computer room, the beauty is suffocating
四大首搭加持,美学、安全、操控、效率优势明显,比亚迪海豹售价20.98万元起售!
MongoDB启动报错 Process: 29784 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=14)
惊艳!京东T8纯手码的Redis核心原理手册,基础与源码齐下
71页全域旅游综合整体解决方案2021 ppt
ROS 导航
使用 protobuf 进行数据序列化
English语法_不定代词 - both / either / neither