How to change connection retry options for SQL pool?

Konstantin Kulikov 5 Reputation points
2023-03-27T10:05:47.0733333+00:00

Periodically we receive an error 'The SQL pool is warming up'.

Changing ConnectionRetryCount and ConnectRetryInterval as suggested in this documentation doesn't help.

As you can see default connection timeout (15 seconds) is used instead of the one defined in the connection string (30 seconds) and there are no retries:User's image

I'm using Microsoft.Data.SqlClient v 5.0.1 and Dapper 2.0.123.

Connection string:

$"Server={sqlOptions.Value.Endpoint}; Authentication={sqlOptions.Value.Authentication}; Connection Timeout=30; Command Timeout=240; ConnectRetryCount=3; ConnectRetryInterval=1";
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,917 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. HimanshuSinha-msft 19,476 Reputation points Microsoft Employee
    2023-03-27T20:28:41.0933333+00:00

    Hello @Konstantin Kulikov , Thanks for the question and using MS Q&A platform.

    Can you please share which .NET version are you using? They are supported on .net 4.5.1 or later .

    https://learn.microsoft.com/en-us/sql/connect/ado-net/step-4-connect-resiliently-sql-ado-net?view=sql-server-ver16#step-2b-copy-and-paste-sample-code

    User's image

    Thanks Himanshu

    Please accept as "Yes" if the answer provided is useful , so that you can help others in the community looking for remediation for similar issues. 


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.