[Fabric] - Retry behavior of script activity in pipeline

2026-08-06T04:32:22.9066667+00:00

Hi team,

I have a concern regarding the retry behavior of the Script activity when using an Azure Database for PostgreSQL connection, where the main purpose of the activity is to execute a stored procedure.

My concern is: when a retry occurs, will a new connection be established for each retry attempt?

For example:

  • 1st attempt – The stored procedure is executed but fails due to a connection issue or other error.
  • 2nd attempt (retry) – A new connection is established and the stored procedure is called again within a new transaction.

Could you please confirm whether this is the expected behavior?

Thanks

Azure Database for PostgreSQL
0 comments No comments

1 answer

Sort by: Most helpful
  1. Peram Venkateswara Reddy 165 Reputation points Microsoft External Staff Moderator
    2026-08-07T08:45:36.3366667+00:00

    Hi @Nguyen, Anh (CAI - Ho Chi Minh City - CON) , Hope you are doing well.

    Based on the current Microsoft Fabric documentation, retries are performed at the activity level, meaning the Script activity is executed again when a retry is triggered. However, the documentation does not explicitly state whether the PostgreSQL connection is reused or whether a new database session/connection is created for each retry attempt.

    From a practical standpoint, it is safest to treat each retry as a new execution of the Script activity. Because the activity is re-executed, the stored procedure may be invoked again if the previous attempt failed after execution had already started. For this reason, procedures should be designed to handle possible re-execution safely, for example by using idempotent logic or safeguards against duplicate processing.

    One additional consideration is that Retry conditions (preview) are documented as being available only for specific activity types, and Script activity is not listed among the supported activity types. As a result, Script activity retries are configured using the standard retry settings and are not currently documented as supporting conditional retry behavior.

    If you need to verify the exact connection behavior in your environment, the most reliable approach is to review PostgreSQL server-side logs or capture connection/session identifiers during retry attempts and compare them across executions.

    I hope this helps clarify the expected retry behavior.

    References:

    https://learn.microsoft.com/en-us/fabric/data-factory/script-activity

    https://learn.microsoft.com/en-us/answers/questions/5967861/fabric-retry-behavior-of-script-activity-in-pipeli

    https://community.fabric.microsoft.com/t5/Pipelines/How-Useful-is-the-Retry-Setting-in-Fabric-Pipelines/m-p/4269307

    Kind Regards,
    Microsoft Support Team.

    Was this answer helpful?

    0 comments No comments

Your answer

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