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%';

3. show variables like '%wait_timeout%';
Variable_Name                               value
innodb_lock_wait_timeout              50
lock_wait_timeout                           31536000
wait_timeout                                   28800
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Loganathan NatarajanLAMP DeveloperCommented:
Try to increase this value innodb_lock_wait_timeout   =     to 300 or 500

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sqldba2013Author Commented:
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.
Loganathan NatarajanLAMP DeveloperCommented:
you have to restart the service only then the settings value will be set
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

sqldba2013Author Commented:
I have restarted services and still its showing old value 50.Untitled.jpg
sqldba2013Author Commented:
Please advise how to increase Lock wait timeout value in NDB cluster.
Loganathan NatarajanLAMP DeveloperCommented:
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
sqldba2013Author Commented:
Thanks...I have resolved issue myself by changing deadlocktimeout value.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.