Azure DB disconnect and connection timeout
1 answer
It seems like you have timeouts. Unfortunately, re-logic is required. Using the correct retry policy should help you fix / mitigate timeouts and downtime.
Here's 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 a sample code for C #, you have to replicate to Javascript and this should reduce your timeouts and downtime.
If that doesn't fix the problem, write your server name and dbname in mebha at microsoft dot com and I will ask one of our engineers to look at it.
Best,
Meet Bhagdev
Program Manager, Microsoft
+2
source to share