MySQL Forums
Forum List  »  InnoDB

Getting "Lock wait timeout exceeded;" when using "for update"
Posted by: Nic Whale
Date: June 03, 2011 05:00AM

I am have been getting lock wait time out errors for a while in a range of situations. While I think some of them can be explained by Bug 16979 ( http://bugs.mysql.com/bug.php?id=16979) some of them I am not sure.

In some cases the database is getting essentially no use, but I am still getting locks.

Server version: 5.051b-community-NT

So while I am getting lock wait time outs in a variety of situations, I will concentrate on this one for starters.
1. Just recently I have been forced to use "for update" (ie "SELECT lastupdated from documents where id =32422 for update "). Note: id is the primary key.
2. I am getting the error "Lock wait timeout exceeded; try restarting transaction SQLState: 41000 VendorError: 1205"
3. This is NOT within a transaction so Autocommit=ON.
4. Similar behaviour is happening on the production box, so similar version but on Linux.
5. Using Java connector

As i said, the database is not having that much traffic on it, so I assume I must be doing something wrong in the code because it could not be the system....

Any suggestions would be appreciated.

The Whale

Options: ReplyQuote




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.