In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Lock wait timeout exceeded; try restarting transaction some information
1 、
The lock wait timed out. This is caused by the current transaction waiting for other transactions to release lock resources. You can find tables and statements that compete for lock resources, optimize your SQL, create indexes, etc., and if not, you can appropriately reduce the number of concurrent threads.
2 、
Your transaction timed out while waiting for a table to be locked. It is estimated that the table is locked by another process and has not been released.
You can use SHOW INNODB STATUS/G; to look at the lock.
3. Search for solutions
In the [ndbd default] of the management node
District plus:
TransactionDeadLockDetectionTimeOut=10000 (set to 10 seconds) defaults to 1200 (1.2 seconds)
4 、
InnoDB automatically detects deadlocks for rollback or terminates deadlocks.
Quote
InnoDB automatically detects transaction deadlocks and rolls back a transaction or transactions to break the deadlock.
InnoDB tries to pick small transactions to roll back, where the size of a transaction is determined by the number of rows inserted, updated, or deleted.
If the parameter innodb_table_locks=1 and autocommit=0, InnoDB pays attention to table deadlocks and row-level locks at the MySQL level. In addition, InnoDB does not detect MySQL's Lock Tables commands and other storage engine deadlocks.
You should set up innodb_lock_wait_timeout to solve this situation.
Innodb_lock_wait_timeout is the timeout for Innodb to discard row-level locks.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.