MySQL Forums
Forum List  »  InnoDB

Re: Several "Lock wait timeout exceeded; try restarting the transcation"
Posted by: Rick James
Date: May 05, 2016 09:48PM

How are you writing your transactions?

1. autocommit=ON?

2. autocommit=OFF and eventually COMMIT?

3. BEGIN...COMMIT?

#2 is error prone -- programmers tend to forget to COMMIT.
I recommend #3.

If that does not answer the question, please tell us more about the transactions that are going on.

Another recommendation: Batch your INSERTs. 100 at a time is 10x faster than 1 at a time.

Suggest using CURDATE() instead of Date(now()).

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Several "Lock wait timeout exceeded; try restarting the transcation"
1055
May 05, 2016 09:48PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.