sqldba2013
asked on
Lock wait timeout exceeded; try restarting transaction+MySQL
I am getting below error in one of MySQL Database. Please review the below mentioned existing MySQL DB configurations and advise which settings I have to modify to resolve below error.
Error: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
Existing configurations:
1. select @@lock_wait_timeout;
Output: 31536000
2. show variables like '%tx_isolation%';
Output: REPEATABLE-READ
3. show variables like '%wait_timeout%';
Output:
Variable_Name value
-------------------------- ---------- ---------- --
innodb_lock_wait_timeout 50
lock_wait_timeout 31536000
wait_timeout 28800
Error: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
Existing configurations:
1. select @@lock_wait_timeout;
Output: 31536000
2. show variables like '%tx_isolation%';
Output: REPEATABLE-READ
3. show variables like '%wait_timeout%';
Output:
Variable_Name value
--------------------------
innodb_lock_wait_timeout 50
lock_wait_timeout 31536000
wait_timeout 28800
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you have to restart the service only then the settings value will be set
ASKER
Please advise how to increase Lock wait timeout value in NDB cluster.
are you sure in your mysql config file settings changed? I still doubt that you've not changed that. just open the file again and check whether settings changed or not
ASKER
Thanks...I have resolved issue myself by changing deadlocktimeout value.
ASKER
set innodb_lock_wait_timeout=5
when I reconnected to MSQL it was showing old value 50.
Do I need to restart services or above command is wrong?
I have executed above command in workbench tool.