Link to home
Start Free TrialLog in
Avatar of sqldba2013
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
ASKER CERTIFIED SOLUTION
Avatar of Loganathan Natarajan
Loganathan Natarajan
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sqldba2013
sqldba2013

ASKER

I have used below command to set innodb_lock_wait_timeout to 500.

set innodb_lock_wait_timeout=500;

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.
you have to restart the service only then the settings value will be set
I have restarted services and still its showing old value 50.User generated image
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
Thanks...I have resolved issue myself by changing deadlocktimeout value.