- Newest
- Most votes
- Most comments
Hi Braulio B,
Please go through the below steps, I hope it will help to solve your issue.
-
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.
-
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
- 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/
- 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
- 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
- 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.
Relevant content
- Accepted Answerasked 4 years ago
- asked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago