Solved

how to avoid Lock wait timeout exceeded

Posted on 2011-03-07
2
1,087 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 20

Accepted Solution

by:
Muhammad Wasif earned 500 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

Get Database Help Now w/ Support & Database Audit

Keeping your database environment tuned, optimized and high-performance is key to achieving business goals. If your database goes down, so does your business. Percona experts have a long history of helping enterprises ensure their databases are running smoothly.

Question has a verified solution.

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

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

751 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