Master-Slave architecture. Today found from the library SQL thread error, master-slave replication stopped. To view error discoveries:
last_sql_errno:1205
Last_sql_error:slave SQL Thread retried transaction time (s) in vain, giving up. Consider raising the value of the slave_transaction_retries variable.
To view the error log discovery:
2016-05-25 07:27:09 72865 [Warning] Slave sql:could not execute Write_rows event on table xxx.xxx; Lock wait timeout exceeded; Try restarting transaction, Error_code:
1205; Handler error ha_err_lock_wait_timeout; The event ' s master Log mysql-bin.000121, End_log_pos 21432849, error_code:1205
2016-05-25 07:27:09 72865 [ERROR] Slave sql:slave SQL thread retried transaction time (s) in vain, giving up. Consider raising the value of the slave_transaction_retries variable. error_code:1205
2016-05-25 07:27:09 72865 [Warning] slave:lock wait timeout exceeded; Try restarting transaction error_code:1205
2016-05-25 07:27:09 72865 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "Slave START". We stopped at log ' mysql-bin.000121 ' position 21432467
Workaround:
Start slave;
Reason:
MySQL is a bug, you can consider the patch to hit the
MySQL master-slave replication Error1205