Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to avoid Lock wait timeout exceeded

Posted on 2011-03-07
2
Medium Priority
?
1,117 Views
Last Modified: 2012-05-11
I executed the following command which generated the error:
ERROR 1205 (HY000) at line 1: Lock wait timeout exceeded; try restarting transaction

ALTER TABLE mainDB.comment ADD FOREIGN KEY (hcId) REFERENCES mainDB.cycle (hcId);"

How to overcome this error?
0
Comment
Question by:pvinodp
2 Comments
 
LVL 20

Accepted Solution

by:
Muhammad Wasif earned 1500 total points
ID: 35081290
Sometimes restarting MySQL server resolves the issue. Also look at http://harrison-fisk.blogspot.com/2009/01/xa-and-persistent-innodb-locks.html
0
 

Author Closing Comment

by:pvinodp
ID: 35163219
This worked but seems that the solution is just a hack...

Thanks  anyways
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question