1
Vote

Default initial interval causes problems for SqlClient

description

The default value of intitial interval is specified in the RetryPolicy and is set to 1s.

However, this value causes a problem due to the behavior of ADO.NET:
When connection pooling is enabled, and if a timeout error or other login error occurs, an exception will be thrown and subsequent connection attempts will fail for the next five seconds, the "blocking period". If the application attempts to connect within the blocking period, the first exception will be thrown again. Subsequent failures after a blocking period ends will result in a new blocking periods that is twice as long as the previous blocking period, up to a maximum of one minute.
http://msdn.microsoft.com/en-us/library/8xx3tyca(v=vs.110).aspx
We need to increase the default value to 6s.

This is complicated that the fact at RetryPolicy is a core class used across all services. We need a solution that will validate the values for a specific service; in this case, SQL.

comments