How do I check if my AWS DMS migration task is stuck or making progress?

4 minute read
0

I want to troubleshoot my AWS Database Migration Service (AWS DMS) task that’s stuck or not progressing.

Resolution

Check the status of your DMS task

To check the status of your AWS DMS task, complete the following steps:

  1. Open the AWS DMS console.
  2. In the navigation pane, choose Database migration tasks, and then select your task.
  3. Review the status of your task:
    During the full load phase, your task status is Running.
    During the change data capture (CDC) phase or ongoing replication phase of a CDC-only task, your task status is Replication ongoing.
    During a full load and CDC, your task status is Load complete, replication ongoing.

Monitor CloudWatch logs

To check the migration task, monitor the Amazon CloudWatch logs.

  1. Open the AWS DMS console.
  2. In the navigation pane, choose Database migration tasks, and then select your task.
  3. Choose View CloudWatch logs.

Note: When you view your logs, choose Retry to refresh the logs and display the latest information with the timestamp. If you don't see a new message in logs after 5 minutes, then proceed to the next step.

Refresh the table statistics of your DMS task

Refresh the table statistics of your DMS task.

  1. Open the AWS DMS console.
  2. In the navigation pane, choose Database migration tasks, and then select your task.
  3. Choose Table statistics.

During a full load, you see an increase in the Full Load rows value and a change in the Load state value. During ongoing replication, you see an increase in DMLs (Inserts, Updates, and Deletes) and DDLs.

If you have a test database with little activity, then you might not see any change in your task logs or in the table statistic counters.

Monitor CloudWatch metrics for rows that unload and apply

  1. Open the AWS DMS console.
  2. In the navigation pane, choose Database migration tasks, and then choose your task.
  3. Choose CloudWatch metrics.

During the full load phase of the DMS task, choose Full load in the dropdown list of the CloudWatch console to monitor the following metrics:

  • FullLoadThroughputRowsSource: provides detailed information about the rate that AWS DMS can unload source data into the replication instance.
  • FullLoadThroughputRowsTarget: shows the rate that the rows leave the replication instance to commit to the target.

During the CDC phase, choose CDC in the dropdown list of the CloudWatch console to monitor the following metrics:

  • CDCThroughputRowsSource: provides detailed information about the rate that changes are captured from the source and moved to the replication instance.
  • CDCThroughputRowsTarget: shows the rate that the changes are moved from the replication instance to the target.
  • CDCLatencySource: shows the latency in seconds between source and replication instance.
  • CDCLatencyTarget: shows the latency in seconds between replication instance and target.

To confirm that the data migrated to the target, you can also query the record count on the target at specific intervals. The intervals vary based on the load on the source, target, and replication instances and the amount of data that's in a single record.

If you don't see any latency on your DMS task and no new log message appears in the task log, then turn on debug logging. For Full Load troubleshooting, turn on debug logging for SOURCE_UNLOAD and TARGET_LOAD. For CDC, turn on debug logging for SOURCE_CAPTURE and TARGET_APPLY. When the task is running, turn on debug logging, and then monitor the DMS task's CloudWatch logs.

Note: It's a best practice to turn on debug logging only when you troubleshoot the task. When you turn on debug logging, the replication instance disk space can quickly fill up and impact running tasks on the instance.

Related information

AWS Data Migration Service metrics

AWS OFFICIAL
AWS OFFICIALUpdated 7 months ago