Skip to content

How do I troubleshoot AWS DMS replication task failures and stuck states?

3 minute read
0

I want to troubleshoot AWS Database Migration Services (AWS DMS) migration issues, such as replication task failures and stuck states.

Resolution

Replication task failures

To troubleshoot an AWS DMS replication task failure, take the following actions:

  • Confirm that you correctly configured both the source and target endpoints based on your endpoint type.
  • Make sure that your replication instance is the correct size to support the task.
    Note: If you receive an out-of-memory error, then there's insufficient capacity on the replication instance. To resolve this issue, either upgrade to a replication instance with greater memory capacity or run tasks sequentially rather than concurrently.
  • Review the engine-specific limitations for your source and target. Unsupported data types, change data capture (CDC) restrictions, character set incompatibilities, and specific data definition language (DDL) operations can cause task failures.
  • Review Amazon CloudWatch logs for detailed error and warning messages. To search for errors and warnings, enter ]E: or ]W: in the search bar.
  • Check what components log the error message. If the related components are either SOURCE_UNLOAD or SOURCE CAPTURE, then first check the source. If the related components are either TARGET_LOAD or TARGET_APPLY, then first check the target.

To troubleshoot task failures, see Troubleshooting migration tasks in AWS Database Migration Service.

Stuck states

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.

If you have a timing conflict with your API operations, then your task gets stuck in the Modifying state. If you use the AWS CL to manage your tasks, then API operations can conflict.

To resolve this issue, complete the following steps:

  1. Review the shell script or automation process that manages your AWS DMS tasks.
  2. Identify whether a modify-replication-task AWS CLI command runs before a start-replication-task AWS CLI command.
  3. Add a delay between the modify and start commands.
    Example command:
    ``bash
    aws dms modify-replication-task your-modify-parameters
    sleep 120
    aws dms start-replication-task --replication-task-arn your-task-arn --start-replication-task-type your-start-type``
    Note: Replace your-modify-parameters with your parameters for the modify command, your-task-arn with your replication task Amazon Resource Name (ARN), and your-start-type with your start type.

If your AWS DMS replication task remains stuck in the Starting state, then you have resource constraints.

To resolve this issue, review the CPUUtilization, FreeableMemory, SwapUsage, FreeStorageSpace CloudWatch metrics for resource use. If your resource use is high, then update your replication instance type or create multiple tasks to reduce the resource contention.

Related information

Best practices for AWS Database Migration Service

AWS DMS data validation