Azure Data Factory: If Condition activity takes a long time to trigger inner activity

Brian Toan 45 Reputation points
2024-08-20T00:17:33.19+00:00

Hi guys,

From yesterday (2024-08-20), the If Condition activity starts to take a long time to run. As you can see in the picture below, it is triggered at 6.00 AM, but doesn't trigger the inner activity until 6.05AM. The inner activities (Set Variable) also takes an unusual amount of time to run (over 1 minute)

User's image

This doesn't happen with all runs, but when this happens, it takes a very long time for the pipeline to run.

Can you help me on why this may happen?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,640 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Bhargava-MSFT 31,261 Reputation points Microsoft Employee Moderator
    2024-08-22T21:52:45.7266667+00:00

    @Brian Toan

    Based on the JSON, it seems that the If Condition activity is not the cause of the slowness.

    The IfCondition activity depends on the successful completion of two previous activities: set_latest_state_cursor_value and create_table_if_not_exist.

    If either of these activities takes longer than expected the start of the IfCondition will be delayed. Even though the IfCondition itself is simple, any delay in the preceding activities will impact its execution time.

    and In the ifTrueActivities branch, there's a Script activity that runs a TRUNCATE TABLE command on a Snowflake database. If this branch is triggered, the script execution could introduce delays, especially if there's any transient connectivity issue or the Snowflake environment itself is under load.

    Since you're using the AutoResolveIntegrationRuntime, this IR might be under heavy load at times, which could slow down the execution of both the IfCondition activity and the subsequent activities. This is true if multiple pipelines or activities are running concurrently on the same IR..

    To troubleshoot the performance issue, you can use Azure Monitor to check the detailed performance metrics of the activities for any spikes in CPU, memory usage.

    Additionally, you can check the Snowflake performance to ensure that it is not the bottleneck.

    0 comments No comments

  2. Brian Toan 45 Reputation points
    2024-08-25T00:09:28.2266667+00:00

    After a few days, this delay is gone. I guess it was due to something from Azure itself, or maybe due to sudden high load from AutoResolvedIntegrationRuntime as Bhargava mentioned.Anyway, thank you @Bhargava-MSFT for your information.


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.