While executive the pipeline in ADF taking long time

Anandhswarupp 185 Reputation points
2025-06-10T12:15:14.28+00:00

While executive the pipeline in ADF taking long time more then 2hr,Previous same pipeline run with in 1.30 hrs. showing mentioned error. Pipeline format, copy activity run successfully but scrip activity taking long time and pipeline fails showing mentioned error.
copy activity________script_____________ copy activity

Error code 2011

Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Please suggest here to fix it as soon as

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

1 answer

Sort by: Most helpful
  1. Mihir Saxena 0 Reputation points Microsoft External Staff Moderator
    2025-06-13T09:52:40.2766667+00:00

    Hi @Anandhswarupp

    When your Azure Data Factory (ADF) pipeline is running longer than expected and fails with Error Code 2011: Execution Timeout Expired, it typically indicates that a SQL command (within a Script Activity) has exceeded the default command timeout, or the target Azure SQL Database is under performance pressure, causing slower execution.

    Follow the below mentioned resolution steps:

    -- Consider scaling up the Azure SQL Database temporarily during pipeline execution:

    This will avoid timeout issues caused by throttling.

    tier

    -- Monitor Performance and Resource Usage:

    Use Query Performance Insight in Azure SQL to identify long-running queries, Query duration trends and DTU/CPU bottlenecks.

    Under Query Performance Insight Find the query running from ADF and analyze duration, DTU usage.

    performance

    -- Optimize Your SQL Script:

    If the SQL script includes heavy operations like MERGE, large UPDATE, DELETE, or table scans, ensure indexes are in place on join/filter columns. Also break down large operations into smaller chunks. You can also use batching with loops or temp tables to avoid timeouts.

    -- Increase Script Activity Timeout in ADF:

    In ADF Studio, Select the Script Activity in the pipeline. Then In the Settings tab, scroll to Command timeout and set the timeout to a higher value.

    -- Ensure Stable SHIR Connectivity (for On-Prem Source):

    If your source is on-prem (nonprime) and connected via Self-hosted IR, ensure the SHIR host has a stable and high-bandwidth connection to Azure SQL DB. Poor connectivity can also result in long runtimes or intermittent failures.

    0 comments No comments

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.