mysql - When does InnoDB time out instead of reporting deadlock? -


I have a "Lock wait timeout exceeded" error from MySQL that I can not reboot or diagnose I'm sure This is stalemate (as opposed to a transaction, locking its thumb while locking), because my logs show that another process started at the same time, it is also hanging, then release When the time expired before. But generally, the InDB detects Deadlock without the timing. That's why I am trying to understand why this deadlock has not been found.

Both transactions are using isolation level serials. (I have an appropriate understanding of the inodb locking at this isolation level.) There is a non-Indiabib (MySassem) table used in the transaction, which I am inserting and updating. However, I do not understand how this can be included in stand-up, because I believe MySam just takes a table lock during the inclusion and update (again it is released immediately because the mizam transaction is not ), So no other lock is taken. Table lock is organized.

So I am sure that only the indodiabhi tables have been included in the deadlock, so I know why he did not know why. MySQL documentation (http://dev.mysql.com/doc/refman/5.1/en/innodb-deadlock-detection.html) implies that detection of deadlocks always works a lot in terms of problem when searching I had not included any of these things, just inserts, updates and selects (select some of my "updates"), which included things like clear "lock table", "changing table", and "log in delay". For ").

I tried to reproduce by creating a Mianj table and one of two InnoDB tables and putting them into different sequences and updating and "Select for update" in InnoDB but every time I Built a deadline, INODB immediately reported this report. I could not reproduce a time end.

Any other tips for diagnosing this? I am using mysql 5.1.49.

There is a tip that you can use to I , You guess it, show the status of the InnoDB engine.

This information (a large part of the text) gives information about the current table locks, and the last detected deadlock (top header "latest detective deadlock" ), so this trunk is not useful after this fact, but it can help you track a thank you query when it is happening.

mysqladmin debug can also print useful lock-debugging information.

The third trick, which has been described, which is described, is to create a magically-nominated table named innodb_lock_monitor , more detailed lock debugging.

HH!

UPDATE :

It may not be a detention detection because it is not actually a stalemate, but more likely that a process is a Waiting for a line lock on the line that is locked by another process. From the manual for the variable:

Timeout in seconds can wait for a row lock before leaving an inodebi transaction. The default value is 50 seconds A transaction that tries to reach the locked by another NOADB transaction, it will hang in the first few seconds before issuing the following error:

Error 1205 (Hv 000): lock waiting time ended; Try restarting the transaction When a lock waiting timeout expires, the current statement is not executed. The current transaction has not rolled back. (Unless MySQL 5.0.13 InnoDB has a lock waiting timeout, the entire transaction has been brought back.

For example, there is a deadlock, for example, when two processes The rows are locked, which are locked, the other process, and no amount of waiting will solve the conflict.


Comments