Mysql事物锁等待超时(Lock wait timeout exceeded; try restarting transaction)
1. Problem description
When making a query statement, MySQL throws such an exception: Lock wait timeout exceeded; try restarting transaction , which is caused by the current transaction waiting for other transactions to release the lock resource!
2. Solutions
1. Execute the following sql in the database to check the thread status of the current database:
show full PROCESSLIST
2. The trx_mysql_thread_id field of the INNODB_TRX table corresponds to the Id in the show full processlist);
If it is, it means that the sleep thread transaction has not committed or rolled back, but stuck, and we need to delete it manually:
select * from information_schema.innodb_trx
3. Manually delete the found trx_mysql_thread_id:
If trx_mysql_thread_id is 1816 :
kill 1816
buy lipitor 80mg sale & lt;a href="https://lipiws.top/"& gt;order generic atorvastatin& lt;/a& gt; how to buy lipitor
Maakxi
2024-03-10