Skip to content

Add a separate timeout value for transaction operations such as commit #3635

Description

@jehelles

Is your feature request related to a problem? Please describe.

Currently, operations on transactions such as Commit rely on the connection timeout. We would like to increase the commit timeout, but increasing the connection timeout has too many side effects, as we would end up waiting a long time in cases where the database is inaccessible or in case of misconfiguration.

Describe the solution you'd like

Either
a) Add a separate timeout, for example TransactionTimeout
or
b) Change Commit (and other transaction operations) to use the CommandTimeout, as we can increase that one without unintended side-effects.

Describe alternatives you've considered

Our only alternative has so far been to increase the connection timeout, but we have already increased it to 1:30 minute (which is a long time to wait if you set the wrong database name etc.), and it's still not always enough for big transactions in Azure SQL.

Additional context

Example of code using the connection timeout for transaction operation:
https://github.com/dotnet/SqlClient/blob/481a2c40b1d0b3d1f3b0d2cafbfa538362e508d9/src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs#L1195C1-L1197C1

Activity

  1. added theissue type on Sep 30, 2025
  2. moved this from To triage to Backlog in SqlClient Boardon Oct 16, 2025
  3. priyankatiwari08 commented on Sep 17, 2026

    @priyankatiwari08
    Contributor

    /triage

  4. github-actions commented on Sep 17, 2026

    @github-actions

    test placeholder

    Generated by SqlClient Issue Auto-Triage for #3635 · copilot · auto · 56.6 AIC · ⌖ 15.2 AIC · ⊞ 11.9K · ◷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions