Azure DB disconnections and connection timout

1.3k views Asked by At

We're having "storms" of DB disconnections and connections timeouts once every couple of days.

We're running Node.js on Azure WebApps and using tedious to connect SQL Azure, any ideas where to start looking for the problem?

1

There are 1 answers

5
meet-bhagdev On


It seems like you are having timeouts. Unfortunately retry logic is required. Using the correct retry policy should help you fix/mitigate your timeouts and downtime.
Here is what I would recommend :

int connectionTimeoutSeconds = 30;  // Default of 15 seconds is too short over the Internet, sometimes.
int maxCountTriesConnectAndQuery = 3;  // You can adjust the various retry count values.
int secondsBetweenRetries = 4;  // Simple retry strategy.

Here is the sample code for C#, you should be to replicate in Javascript and that should mitigate your timeouts and downtime.

If that does not fix the issue, please email your servername and dbname at mebha at microsoft dot com and I will have one of our engineers look at it.

Best,
Meet Bhagdev
Program Manager, Microsoft