当前位置:网站首页>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
边栏推荐
猜你喜欢

超T动力 盈运天下——中国重汽黄河/豪沃WP14T产品首发荣耀上市!

Application of time series database in the field of ship risk management

Web3创始人和建设者必备指南:如何构建适合的社区?

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

Office Automation | Office Software and Edraw MindMaster Shortcuts

Baijiahao cancels the function of posting documents on the interface: the weight of the plug-in chain is blocked

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

Remember an experience of interviewing an outsourcing company, should you go?

Why do software testing have to learn automation?Talk about the value of automated testing in my eyes

三电系统集成技术杂谈
随机推荐
MongoDB启动报错 Process: 29784 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=14)
Huawei issues another summoning order for "Genius Boys"!He, who had given up an annual salary of 3.6 million, also made his debut
The evolution of content products has three axes: traffic, technology, and product form
A new generation of open source free terminal tools, so cool
English语法_不定代词 - both / either / neither
查阅所连接过的WiFi所有信息(含密码)(访问历史所有WiFi连接)
双碳目标下:农田温室气体排放模拟
基于FPGA的DDS任意波形输出
Smart Contract Security - Private Data Access
Understand the Chisel language. 29. Chisel advanced communication state machine (1) - communication state machine: take the flash as an example
Container sorting case
Huawei's 7-year-experienced software testing director, gives some advice to all friends who want to change careers to learn software testing
5G-based Warehousing Informatization Solution 2022
四大首搭加持,美学、安全、操控、效率优势明显,比亚迪海豹售价20.98万元起售!
The main content of terrain analysis (the special effect level of the wandering earth)
JSON常用注解
5. DOM
桌面软件开发框架大赏
怎么判断两个字符串是否相等?
postgresql的普通字符串和转义字符串