Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Lock wait timeout exceeded; try restarting transaction parameter control

2025-03-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

The lock wait timed out. Roll back the transaction.

When transaction 1 acquires the lock

Start TRANSACTION

Update user set username='gh4g' where id=2;# acquires lock

Transaction 2 starts the transaction at this time

Start TRANSACTION

Update user set username='m3mm' where id=2

It is easy to report a lock waiting error after a period of time.

Lock wait timeout exceeded; try restarting transaction

So which parameter controls this period of time? no, no, no. no, no, no.

The parameters are as follows

Innodb_lock_wait_timeout=50

Indicates that the lock waiting time is 50 seconds. Failure to acquire a lock within 50 seconds will result in an error

Lock wait timeout exceeded; try restarting transaction

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report