Hi frens,
I am getting: Lock wait timeout exceed; try restarting transaction related to mysql ....
Actually im using windows service which will access database to sync data.....it ll happen in background ....and also the normal application is also referring to the database ...sometimes the transaction will be huge .... i guess these two are colliding at some point and thats when lock is happening ? i am not sure ! please guide how to solve the issue ...any help will be appreciated
Thanks
Darshan
解决方案Hi,
This error usually occurs when a transaction is waiting for a resource which is already locked by some other transaction.
First of all, after this error occurs, you should run SHOW ENGINE INNODB STATUS in order to get more information. Link: SHOW ENGINE INNODB STATUS[^]
Let me know the results.
Also, you should consider increasing the default (50 seconds) lock wait timeout value. Link: innodb_lock_wait_timeout[^]