• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction

 
Aadil Shaik
Greenhorn
Posts: 25
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I am running into database locks related issue.
My application runs as a single batch process without any issues while executing database statements (selects, inserts and updates). But while multiple batches run simultaneously to execute the database statements I am running into database locks issue.
'java.lang.Exception: java.lang.Exception: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction

I am going to try the below options.
SET GLOBAL tx_isolation='READ-COMMITTED';
SET SESSION tx_isolation='READ-COMMITTED';
set innodb_lock_wait_timeout=500;

Are there any other precautions do I need to take?

Thanks in advance
Aadil
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!