Stored Procedure is getting executed twice simultaneously in ADF pipeline

Mounika Moni Patro 0 Reputation points
2024-08-08T10:01:14.22+00:00

I have an ADF pipeline in which a stored procedure is triggered. Sometimes the sp is executed twice almost simultaneously with difference of few seconds for single adf run. First sp execution is getting successful but the second one is failing with deadlock error. Not sure why this duplication is happening. Need support here.

Azure SQL Database
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,718 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Smaran Thoomu 16,005 Reputation points Microsoft Vendor
    2024-08-08T13:45:49.2933333+00:00

    Hi @Mounika Moni Patro
    Thanks for the question and using MS Q&A platform.

    As I understand you are experiencing an issue with duplicate stored procedure executions in your ADF pipeline, which is causing a deadlock error. Here are some steps you can take to troubleshoot and resolve the issue:

    • ADF Pipeline Retry Policy: ADF has a built-in retry policy for failed activities. If the stored procedure execution fails, ADF might retry the activity, causing the duplicate execution.
    • Concurrent Execution: If your pipeline is configured to run concurrently, multiple instances of the stored procedure might be executed simultaneously, leading to the deadlock error.
    • Triggering Mechanism: The way you're triggering the stored procedure might be causing the duplication. For example, if you're using a trigger-based approach, it's possible that the trigger is firing multiple times.
    • Check the ADF Pipeline Run History: Go to the ADF portal, navigate to the pipeline run history, and check if there are any retry attempts or concurrent runs that might be causing the duplicate execution.

    If you're still struggling to resolve the issue, please provide more details about your pipeline, stored procedure, and triggering mechanism, and I'll do my best to help you troubleshoot!

    I hope this helps! Let me know if you have any further questions.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.