Resume running a DMS task

0

Good morning everybody. I have some DMS tasks responsible for taking existing data and modifications on an EC2 type SQL Server server to S3, it happens that this server is turned off overnight, causing the task to fail and I have to resume it Every morning, I tried to adjust the RecoverableErrorThrottlingMax parameter, to increase the connection attempt interval, but I was unsuccessful, has anyone ever experienced a scenario like this?

asked 3 months ago134 views
1 Answer
0

Hi Braulio B,

Please go through the below steps, I hope it will help to solve your issue.

  1. Understand the Issue: Your EC2 SQL Server is turned off overnight, causing the Data Migration Service (DMS) tasks to fail because they can't access the source database during that time.

  2. Error Handling and Retry Mechanism:

  • Parameter Adjustment: The RecoverableErrorThrottlingMax parameter might not be sufficient or appropriate for your scenario. This parameter is usually more relevant for handling throttling errors rather than complete downtime.

  • Task Settings: Check other DMS task settings that might help with retries and error handling. For example, you can configure the retry settings for tasks and possibly increase the timeout intervals. See Configuring task settings.

https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.html

  1. Automate EC2 Startup:
  • Schedule Startup: Automate the startup of your EC2 instance using AWS Systems Manager, a cron job, or another scheduling tool. Ensure that the EC2 instance starts before your DMS tasks are scheduled to run. For more information, see Scheduling EC2 instance start and stop.

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html

  • EC2 Instance Scheduler: AWS provides an EC2 Instance Scheduler that allows you to automatically start and stop instances based on a schedule. This can help ensure your SQL Server is available when needed. For details, visit EC2 Instance Scheduler.

https://aws.amazon.com/solutions/implementations/instance-scheduler-on-aws/

  1. DMS Task Configuration:

Retry Logic: Review your DMS task settings to ensure they are configured to handle connection failures gracefully. Some tasks can be set up to automatically retry failed operations, which might help reduce manual intervention. See Configuring task settings.

https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.html

Error Logging: Enable detailed logging for your DMS tasks to understand the specific errors encountered. This can help in fine-tuning the retry logic and understanding if there are other underlying issues. For information on logging, see Amazon DMS Task Logs.

https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Monitoring.html

https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.Logging.html

  1. Monitor and Alert:
  • Monitoring: Set up CloudWatch alarms and monitoring for both your EC2 instance and DMS tasks. This will help you quickly identify issues when they occur and potentially automate responses. Refer to Amazon CloudWatch for more details.

https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html

  • Alerts: Create alerts for failures or anomalies in the DMS tasks so you can act quickly if the tasks fail due to the EC2 instance being offline. For guidance on setting up alerts, see CloudWatch Alarms.

https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html

  1. Testing:

Simulate Downtime: Test your DMS tasks with simulated downtime to ensure that your retry mechanisms and error handling are effective. This can help you understand how your tasks behave when the EC2 instance is not available.

EXPERT
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions