I'm having serious problems in a DB, where a "Waiting for table level lock" box is loitering and locks the whole system:

enter image description here

Based on some research, when the problem occurred to get the command "SELECT * FROM information_schema.metadata_lock_info;" and the result was: enter image description here

continue enter image description here

One DB engine is MyIsam.

What could be happening? I have 50 simultaneous accesses on average.

  • Welcome to Super User! We use only English here. Please edit and translate your question to English. – Aulis Ronkainen Apr 3 '19 at 18:41

Table-level locks exist with MyISAM; they are avoided with InnoDB. Change the ENGINE.

"Metadata" locks can happen with either Engine.

In the first image, what is the entire query at the top of the list? Please provide it in machine-readable format, not as a picture. Also provide SHOW CREATE TABLE for the table(s). Perhaps we can help you speed up the query. It has been running 78 seconds and is probably blocking the rest of the connections.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy