MySQL Forums :: InnoDB :: Getting "Lock wait timeout exceeded;" when using "for update"


Advanced Search

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


Subject Views Written By Posted
Getting "Lock wait timeout exceeded;" when using "for update" 3383 Nic Whale 06/03/2011 05:00AM
Re: Getting "Lock wait timeout exceeded;" when using "for update" 957 Rick James 06/04/2011 09:27AM
Re: Getting "Lock wait timeout exceeded;" when using "for update" 897 Nic Whale 06/04/2011 07:29PM
Re: Getting "Lock wait timeout exceeded;" when using "for update" 1245 Nic Whale 06/04/2011 09:34PM
Re: Getting "Lock wait timeout exceeded;" when using "for update" 879 Rick James 06/04/2011 11:47PM
Re: Getting "Lock wait timeout exceeded;" when using "for update" 892 Nic Whale 06/07/2011 09:01PM
Re: Getting "Lock wait timeout exceeded;" when using "for update" 933 Rick James 06/08/2011 12:01AM
Re: Getting "Lock wait timeout exceeded;" when using "for update" 798 Aftab Khan 06/09/2011 07:43AM


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.