we are running java application, running for ages, back end is db is MySQL, recently updated to mysql 5.6. Everything was running fine, past week started getting this error
Lock wait timeout exceeded; try restarting transaction which looks like never stop ending
don't know what to do with this error to stop. why it is occurring all of sudden
MySQL – Lock Wait Timeout Exceeded; How to Restart Transaction
MySQLmysql-5.6
Related Question
- Thesql “Lock wait timeout exceeded” two transaction with different keys indexed
- MySql timeouts waiting for table lock, no apparent deadlocks
- Mysql – How to avoid lock wait timeout exceed and improve MySQL InnoDB write speed
- MySQL – Timeout on INSERT Lasts Almost 60 Seconds
- MySQL: What happen when an executing sql’s client is terminated
- Mysql – “Lock wait timeout exceeded; try restarting transaction” for the delete query
Best Answer
You can set variable innodb_lock_wait_timeout=100 for lock time to 100 sec.
The transaction which is timeout, try to lock table which is hold by another process. and your timeout variable set with little number of second. so it shows error. You can see more status by the command.
You can see list of locked tables by-
Now see the thread which is using this table
now you can kill that thread or wait to complete it.