Lock wait timeout exceeded; try restarting transaction
From Kolmisoft Wiki
Jump to navigationJump to search
What is happening is, some other thread is holding a record lock on some record for too long, and your thread is being timed out.
One cause of the problem is wrong indexes on the table. And with wrong indexes MySQL tries to do a lot of operations on the table with full-scan and timeouts.
Check indexes, fix them if necessary.