Hello @Anuganti Suresh
Welcome to the Microsoft Q&A and thank you for posting your questions here.
Regarding your questions, on how to automatically rerun failed pipeline in ADF and why it is running repeatedly and how to handle this situation.
To address this situation, you can utilize Azure Data Factory's built-in functionality to handle retries and resume execution from the failed activity. Answers to question one will resolve all.
Technically, couple of things you can do are not more than these three listed here:
- You can configure a retry policy for Execute Pipeline3 activity to automatically retry in case of failure. You can specify the number of retry attempts and the interval between retries. In Azure Data Factory, configuring a retry policy for your pipeline can be done in a couple of ways, depending on your use case:
- Tumbling Window Trigger: If you’re using a tumbling window trigger, retry capabilities are built into Data Factory. You can set the retry policy directly in the trigger’s configuration: Head over to your trigger’s configuration page. Set the Retry policy: count (number of retries) and Retry policy: interval in seconds properties according to your requirements. This trigger will automatically retry failed pipeline runs due to concurrency, server limits, or throttling issues (status codes 400: User Error, 429: Too many requests, and 500: Internal Server error).
- Activities Retry Logic:
- Ensure that Execute Pipeline3 activity is set to complete before proceeding to Execute Pipeline4. This means that even if it fails, it won't trigger the subsequent activities until it completes successfully or exhausts its retry attempts.
- In the same Execute Pipeline3 activity settings: Ensure that the "Completion" condition is set properly. It should be set to "All" or to the specific conditions that indicate the activity's success. This ensures that the subsequent activities won't trigger until Execute Pipeline3 successfully completes or exhausts its retry attempts.
- Implement error handling within Execute Pipeline3 activity to catch and handle specific errors if needed. You can define actions to take based on the type of error encountered.
- Still within the Execute Pipeline3 activity settings: Configure error handling options such as logging errors, retrying on specific error types, or taking specific actions based on the error encountered. Save the changes.
By following these steps above, you'll have configured retry policies, completion conditions, error handling, and rerun settings to handle failures and automate the recovery process in Azure Data Factory. Also, utilize the additional resources by the right side of this page.
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
Please remember to "Accept Answer" if answer helped, so that others in the community facing similar issues can easily find the solution.
Best Regards,
Sina Salam