Skip to content

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

@jehelles

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

Metadata

Metadata

Assignees

Labels

Enhancement 💡Issues that are feature requests for the drivers we maintain.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions