Click here to Skip to main content
15,884,353 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Posted

1 solution

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[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900