Mysql error: Lock wait timeout exceeded 1. Lock wait timeout. This is because the current transaction is waiting for other transactions to release the lock resource. You can find tables and statements that compete for Lock resources, optimize your SQL statements, create indexes, and so on. If it still does not work, you can reduce the number of concurrent threads as appropriate. 2. Your transaction timed out while waiting to lock a table. It is estimated that the table is locked by another process and has not been released. You can use show innodb status/G to check the lock. 3. search solution: Add TransactionDeadLockDetectionTimeOut = 10000 (set to 10 seconds) in the [ndbd default] area of the Management node. The default value is 1200 (1.2 seconds) 4. InnoDB automatically checks deadlocks for rollback or terminates deadlocks. If innodb_table_locks = 1 and autocommit = 0, InnoDB will pay attention to table deadlocks and MySQL-level row locks. In addition, InnoDB does not detect the Lock Tables command of MySQL and deadlocks of other storage engines. You should set innodb_lock_wait_timeout to solve this problem. Innodb_lock_wait_timeout is the timeout time for Innodb to discard row-level locks.