Skip to content

How do I resolve AWS DMS task issues during data migration from the source to the target?

4 minute read
0

I want to resolve issues with my AWS Database Migration Service (AWS DMS) task when I migrate data from the source to the target.

Resolution

To resolve issues when you're migrating data, first run diagnostic scripts that are specific to your database. Then, use the following resolution based on the issue that you identified.

Task failures during migration

An AWS DMS task might fail during migration for the following reasons:

  • Missing prerequisites
  • Insufficient database permissions for your source or target
  • Network connectivity
  • Data issues

To resolve these issues, take the following actions:

  • Confirm that AWS DMS supports your source and target database versions and configurations.
  • Review the last failure message on the AWS DMS console to identify why the migration task stopped.
    Example of a last failure message:
    "[TARGET_LOAD ]E: RetCode: SQL_ERROR SqlState: 08S01 NativeError: 2013 Message: [MySQL][ODBC 5.3(w) Driver][mysqld-5.7.16-log]Lost connection to MySQL server during query [122502] ODBC general error.'"
  • Activate detailed debug logging. Search for "E:" to find error lines and search for "W: " to find warning lines.
  • To identify the log component, run the following commands.
    Source extraction:
    SOURCE_UNLOAD
    - or-
    SOURCE_CAPTURE errors
    Target loading:
    TARGET_LOAD
    - or-
    TARGET_APPLY errors

Change data capture latency issues

If you have high latency, then the AWS DMS migration might take longer to appear on the target endpoint.

To resolve this issue, take the following actions:

  • Review the CDCLatencySource or CDCLatencyTarget Amazon CloudWatch metrics to determine whether latency is at the source or target.
  • Check the CPU, memory, and input/output per second (IOPS) usage on the source, target, and replication instance. If your resources are constrained, then resize the replication instances.
  • Review the network bandwidth between components.

Full load performance issues

If migrated data doesn't appear on the target after you start a full load task, then the initial data load might run slowly or get stuck.

To resolve this issue, take the following actions:

Data validation failures

If you activate data validation and run an AWS DMS task, then the validation state shows "Error" or "Mismatched records".

To resolve this issue, take the following actions:

Endpoint connection failures

If you create a new AWS DMS endpoint and your TestConnection API operation fails for your source or target endpoints, then you might experience connectivity issues.

To resolve this issue, see How do I troubleshoot AWS DMS endpoint connectivity failures?

Related information

Best practices for AWS Database Migration Service

Troubleshooting migration tasks in AWS Database Migration Service

Troubleshooting latency issues in AWS Database Migration Service