• Register
0 votes
274 views

Problem :

I am getting bellow error

java.sql.sqlexception lock wait timeout exceeded try restarting transaction

I am using Java Struts 2.1 Hibernate configuration. DB Used is MYSQL.

Anyone know how to solve it..??

6 5 3
6,930 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

Pleaase make sure the database tables are using InnoDB storage engine and READ-COMMITTED transaction isolation level.

Now you can check it by SELECT @@GLOBAL.tx_isolation, @@tx_isolation; on mysql console.

If it is not set to be READ-COMMITTED then you must set it. You must make sure before setting it that you have SUPER privileges in mysql.

Further Readings :

https://github.com/zendesk/maxwell/issues/386

9 7 4
38,600 points

Related questions

1 vote
1 answer 5 views
5 views
Problem: Why I got the error : java.sql.sqlexception: lock wait timeout exceeded; try restarting transaction
asked Mar 25 MUHAMMAD MUNEEB 83k points
0 votes
1 answer 3 views
3 views
Problem: I'm running the following MySQL UPDATE statement:mysql> update customer set account_import_id = 1; ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction I'm not using a transaction, so why would I be getting this error? I even tried restarting my MySQL server and it didn't help.
asked 2 days ago sumaiya simi 43.9k points
0 votes
1 answer 3 views
3 views
Problem: I'm running the following MySQL UPDATE statement: mysql> update customer set account_import_id = 1; ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction I'm not using a transaction, so why would I be getting this error? I even tried restarting my MySQL server and it didn't help. The table has 406,733 rows.
asked 3 days ago ochena 22.1k points
0 votes
1 answer 3 views
3 views
Problem: In my production error logs I occasionally see: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction I know which query is trying to access the database at that moment but is there a way to find out which query had the lock at that precise moment?
asked 4 days ago anika11 32k points
0 votes
1 answer 3 views
3 views
Problem: I'm running the following mysql update ststement but I am not using a transaction, so why would I be getting this error? I even tried restarting my MySQL server and it did not help.How can I get the solution ?
asked 5 days ago salim1 60.6k points
1 vote
1 answer 50 views
50 views
Problem : I am very beginner to MYSQL. Currently I have the innomyDB table which is recording my online users. It will get updated on the every page refresh by the user so that it can keep the track of which the pages they are currently on and then their last access ... is showing if I try to run the INSERT queries into my table. Looking for MYSQL expert who can help me in fixing my above error.
asked May 4, 2020 stewart 4k points
0 votes
1 answer 24 views
24 views
Problem: How to solve this sql exception?? Please someone help me ...
asked Mar 11 Ifra 34.7k points
0 votes
1 answer 157 views
157 views
Problem: I am working on Hibernate and now I am facing what I believe is a simple problem with the Hibernate but still I can't solve it. I have written a simple class I would like to persist but still keep facing below error: SEVERE: Field 'id' doesn't have a ... that is not working for me. Initializing the id also did not help me either! I am looking for Hibernate expert to fix my above error.
asked Jul 30, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 557 views
557 views
Problem : I got following exception from my servlet: java.lang.illegalstateexception: response has already been committed
asked Oct 31, 2019 peterlaw 6.9k points
0 votes
2 answers 760 views
760 views
Problem : I am new to the Spring and JPA, wasted 10 days and no result with the searching on internet. I want to save the object to SQL SERVER, my connection is correct but when I write .flush() I get below exception “nested exception is javax.persistence.TransactionRequiredException: no transaction is in progress”
asked Jan 21, 2020 jwilliam 3.9k points