Lock wait timeout exceeded; try restarting transaction
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.
Subject
Written By
Posted
Lock wait timeout exceeded; try restarting transaction
September 06, 2013 01:58AM
September 07, 2013 10:52AM
September 08, 2013 03:17AM
September 08, 2013 09:16AM
September 08, 2013 12:19PM
September 08, 2013 06:35PM
September 17, 2013 12:57AM
September 17, 2013 07:26PM
September 18, 2013 01:20AM
September 18, 2013 07:27PM
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.