-
Notifications
You must be signed in to change notification settings - Fork 317
Description
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