0

If a transaction holds a lock on a table for over xx minutes, abort/rollback the transaction & release the lock.

Problem i am trying to solve: One of the tables was locked for over an hour, to execute a slow update query. All other transactions which required locking the same table started failing since it could not acquire a lock.

The slow query was fixed, but wondering if there is a failsafe switch "max_lock_timeout" or so which can release a lock if it exceeds certain threshold.

Da_Vicki
  • 91
  • 1
  • 8
  • Pls check all answers to the duplicate question, not just the accepted one. – Shadow Mar 04 '21 at 19:51
  • There are no "table locks" in InnoDB. The default for `lock_wait_timeout` is 50 seconds. (Much too high in my opinion.) There are techniques to help avoid such, but show us the conflicting queries. – Rick James Mar 05 '21 at 22:59

0 Answers0