Error: "Lock Wait timeout exceeded; Try restarting transaction" Mysql

Asked

Viewed 618 times

1

I’m trying to feed a table in mysql with information from another table, but when I update it returns this error:

Error: "Lock Wait timeout exceeded; Try restarting transaction".

The update code is as follows.

 UPDATE mis.basecelmax tbl
SET tbl.obs =
  (SELECT max(tmp.obs)
   FROM mis.basetemp tmp
   WHERE tmp.id = tbl.id)
WHERE tbl.obs IS NULL
  AND tbl.id > 0

This happens regardless of the amount of records I try to update.

  • 1

    Complicated to analyze only with this information. How many records are changed in this update?

  • 1

    In the table I have about 23k records for change, but with the no uptade error in any.

  • 1

    Samuel What Is Your Hosting Like? It Might Be The Server That Doesn’t Support This query.

  • 1

    In case the server supports yes the query Moises, I already managed to run this update yesterday in tests, but today trying to run with the history was not.

  • 1

    @Samuelalves in his test had the same amount of records?

  • No, I tested with few records, today I tried with 23k, and I had this error. I tried to return to the small amount of tests and the error persisted.

  • Still it was good to check with your server. This error is common for infrared problems.

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.