79482588

Date: 2025-03-04 03:18:58
Score: 1
Natty:
Report link

Most likely your SqlException has _doNotReconnect = true. Here you can see how the provider checks if an exception is transient: https://github.com/dotnet/SqlClient/blob/9450fde6e79c0197dbf8189e578078549ad5fee0/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs#L113

if (retriableConditions != null && e is SqlException ex && !ex._doNotReconnect)

To control it, you can create your custom provider and implement your own TransientErrorsCondition() as you want. See a sample at https://learn.microsoft.com/en-us/sql/connect/ado-net/configurable-retry-logic-core-apis-sqlclient

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Vasiliy Zverev