当前位置:网站首页>1205 Lock wait timeout exceeded; Try restarting transaction processing
1205 Lock wait timeout exceeded; Try restarting transaction processing
2022-07-26 01:59:00 【Let God love you】
1205 - Lock wait timeout exceeded; try restarting transaction
solve :
select * from information_schema.innodb_trx; -- Found the read-only transaction that has not been committed
kill thread id; -- After the corresponding thread
MySQL 5.5 – innodb_lock_wait lock wait for
before , When there is a :ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction,
It's a troublesome thing to solve ;
Especially when a SQL performed , But not COMMIT, hinder SQL To execute is to be locked , Timeout end ;
DBA It is impossible to find out the source just from the database SQL lock ;
Sometimes lookshow engine innodb status, And combineshow full processlist;Can solve the problem temporarily ; But it has been unable to accurately locate ;
stay 5.5 in ,information_schema Three tables about locks are added to the library (MEMORY engine );
innodb_trx ## All currently running transactions
innodb_locks ## The current lock
innodb_lock_waits ## The correspondence of lock waiting
Take a look at the table structure
desc information_schema .innodb_locks;
+-------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+---------------------+------+-----+---------+-------+
| lock_id | varchar(81) | NO | | | |# lock ID
| lock_trx_id | varchar(18) | NO | | | |# The transaction that owns the lock ID
| lock_mode | varchar(32) | NO | | | |# The lock mode
| lock_type | varchar(32) | NO | | | |# Lock type
| lock_table | varchar(1024) | NO | | | |# Locked watch
| lock_index | varchar(1024) | YES | | NULL | |# Locked index
| lock_space | bigint(21) unsigned | YES | | NULL | |# Locked tablespace number
| lock_page | bigint(21) unsigned | YES | | NULL | |# Locked page number
| lock_rec | bigint(21) unsigned | YES | | NULL | |# Locked record number
| lock_data | varchar(8192) | YES | | NULL | |# Locked data
+-------------+---------------------+------+-----+---------+-------+
desc information_schema .innodb_lock_waits;
+-------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+-------------+------+-----+---------+-------+
| requesting_trx_id | varchar(18) | NO | | | |# The transaction requesting the lock ID
| requested_lock_id | varchar(81) | NO | | | |# A lock that requests a lock ID
| blocking_trx_id | varchar(18) | NO | | | |# Transactions that currently have locks ID
| blocking_lock_id | varchar(81) | NO | | | |# Locks that currently have locks ID
+-------------------+-------------+------+-----+---------+-------+
desc information_schema .innodb_trx ;
+----------------------------+---------------------+------+-----+---------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------------------+---------------------+------+-----+---------------------+-------+
| trx_id | varchar(18) | NO | | | |# Business ID
| trx_state | varchar(13) | NO | | | |# State of affairs :
| trx_started | datetime | NO | | 0000-00-00 00:00:00 | |# Transaction start time ;
| trx_requested_lock_id | varchar(81) | YES | | NULL | |#innodb_locks.lock_id
| trx_wait_started | datetime | YES | | NULL | |# The time when the transaction starts to wait
| trx_weight | bigint(21) unsigned | NO | | 0 | |#
| trx_mysql_thread_id | bigint(21) unsigned | NO | | 0 | |# Transaction thread ID
| trx_query | varchar(1024) | YES | | NULL | |# Specifically SQL sentence
| trx_operation_state | varchar(64) | YES | | NULL | |# The current operation state of the transaction
| trx_tables_in_use | bigint(21) unsigned | NO | | 0 | |# How many tables are used in the transaction
| trx_tables_locked | bigint(21) unsigned | NO | | 0 | |# How many locks does the transaction have
| trx_lock_structs | bigint(21) unsigned | NO | | 0 | |#
| trx_lock_memory_bytes | bigint(21) unsigned | NO | | 0 | |# Transaction locked memory size (B)
| trx_rows_locked | bigint(21) unsigned | NO | | 0 | |# Number of rows locked in transaction
| trx_rows_modified | bigint(21) unsigned | NO | | 0 | |# Number of rows changed by transaction
| trx_concurrency_tickets | bigint(21) unsigned | NO | | 0 | |# Number of transactions and invoices
| trx_isolation_level | varchar(16) | NO | | | |# Transaction isolation level
| trx_unique_checks | int(1) | NO | | 0 | |# Is the uniqueness check
| trx_foreign_key_checks | int(1) | NO | | 0 | |# Whether foreign key check
| trx_last_foreign_key_error | varchar(256) | YES | | NULL | |# Last foreign key error
| trx_adaptive_hash_latched | int(1) | NO | | 0 | |#
| trx_adaptive_hash_timeout | bigint(21) unsigned | NO | | 0 | |#
+----------------------------+---------------------+------+-----+---------------------+-------
select * from information_schema.innodb_lock_waits G
边栏推荐
- win下搭建嵌入式开发环境及frp穿透
- Redis6.x配置参数详解
- leetcode/只出现一次的数字
- HTC手机官解、S-ON/S-OFF与超级CID的关系
- 【独立站建设】shopify卖家:学会这几点,网上商店销量翻倍!
- What is cross site scripting (XSS)?
- SQLyog数据导入导出图文教程
- The import and Export button of Damon database table is gray, and the DMP file cannot be imported
- 1205 Lock wait timeout exceeded; try restarting transaction处理
- Jupiter notebook reported an error: notebook validation failed: non unique cell ID '2a4xx6' detected
猜你喜欢

IP address of the network

PHP Alipay transfer to Alipay account

Silicon Valley classroom - official account cloud on demand Silicon Valley classroom microservice project practical notes

How to display numbers / English time in Excel

推荐系统-协同过滤在Spark中的实现

The detailed knowledge summary of MySQL can be collected

Why does the debugger display the wrong function
SQL injection tutorial: learn through examples
![[Verilog digital system design (Xia Yuwen) 4 ----- basic concepts of Verilog syntax 2]](/img/fe/746ecaf4123072cca59d7510e9796c.png)
[Verilog digital system design (Xia Yuwen) 4 ----- basic concepts of Verilog syntax 2]

pt-onnx-ncnn转换的问题记录(接yolov5训练)
随机推荐
【独立站建设】shopify卖家:学会这几点,网上商店销量翻倍!
【2020】【论文笔记】磁控溅射法生长Bi2Te3/CoFeB双层异质结——
flutter 下 grpc list没有Setter 方法 ,如何使用相关属性
Worthington nuclease and Micrococcus related research and determination scheme
When everything can be metauniverse, the development of metauniverse seems to have entered a new stage of development
给RestTemplate添加拦截器记录请求响应,还需解决流只读一次的问题
Overview of database stress testing methods
How to do Taobao live broadcast and how to do the anchor to drain and sell products
P3166 number triangle (tolerance and exclusion +gcd)
【深入浅出玩转FPGA学习11----Testbench书写技巧1】
The import and Export button of Damon database table is gray, and the DMP file cannot be imported
D. Rating compression (thinking + double pointer)
MySQL transaction isolation level
SQL injection tutorial: learn through examples
[Verilog digital system design (Xia Yuwen) 4 ----- basic concepts of Verilog syntax 2]
Summary after reading "poor dad and rich dad"
[tips] what if you type with double quotation marks on the keyboard and the quotation marks disappear
Make and makefile summary II
Worthington papain - production of glycopeptides from purified proteoglycans (attached Literature)
【Verilog数字系统设计(夏宇闻)3-----Verilog语法的基本概念1】