MySQL Forums
Forum List  »  General

Lock wait timeout exceeded; try restarting transaction
Posted by: Lars Gustafsson
Date: September 06, 2013 01:58AM

We are using MySQL v5.1.67 under Solaris (SmartOS) in a zone. We are using Java EE and Jetty as our servlet container (Hibernate, Ehcache). Sometimes we get: "Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Error while commiting the transaction" and then "Lock wait timeout exceeded; try restarting transaction". We have the database as one file instead of one file per table. The file is large about 20 GB. There are millions of rows in many tables. One table has 30 million rows. Some table has varchar(255)s. Some others have texts. It seems like cells in the database has been broken. Because if you try to update the same entry in the DB you get a "Lock wait timeout exceeded; try restarting transaction", just by issuing a MySQL query. The problem persists until you restart the DB server. Sometimes they start appearing again after a while. Now they seem to come more and more often. There are a lot of threads in the Java EE .war application. We send more and more JMS messages. There is also PHP-code accessing the database. How do we stop this problem from occuring?



Edited 4 time(s). Last edit at 09/06/2013 06:03AM by Lars Gustafsson.

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.