Help Center> Data Replication Service> Troubleshooting> Failure Cases> Real-Time Migration and Synchronization from MySQL to MySQL> Full Phase Error: Lock wait timeout exceeded; try restarting transaction
Updated on 2023-01-17 GMT+08:00

Full Phase Error: Lock wait timeout exceeded; try restarting transaction

Scenarios

During a full migration or synchronization, an error is reported, and the log information is as follows: service DATAMOVE failed, cause by: apply event=[type=table_data, batch_index_in_shard=***, table_schema= %s, table_name= %s, record_num=***] occur error, msg=apply data of table=` %s `.` %s ` failed: Lock wait timeout exceeded; try restarting transaction.

Possible Causes

  • The service connection of the destination database holds the lock for a long time.
  • The performance of the destination database is insufficient or the load is heavy, and the execution is slow.

Solution

  1. Contact the O&M personnel to check the lock usage, slow SQL statements, or load status of the destination database.
  2. After the destination database is restored, click Resume in the Operation column to resume the task.