Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Saturday, January 23, 2016 6:20 AM
Hi,
We have multiple database in one azure. At the time of having only one database in azure, it doesn't have connection failure at any time. But after adding the database one by one. Its getting database connection error randomly.
The below exception we got.
An exception occurred while initializing the database. See the InnerException for details.
An exception has been raised that is likely due to a transient failure. If you are connecting to a SQL Azure database consider using SqlAzureExecutionStrategy
Can anyone update on this?
Thanks,
Saravanan.
All replies (3)
Sunday, January 24, 2016 6:27 PM
First you should post this to Azure SQL Database forum. Also post from Markus Wagner helped me to learn SqlAzureExecutionStrategy class: http://ritzlgrmft.blogspot.fi/2014/03/working-with-sqlazureexecutionstrategy.html
Monday, January 25, 2016 2:10 AM
Hi Saravanan,
I agree with MasaSam, your case more related to Azure SQL Database, I will help move your case to
Microsoft Azure > Azure SQL Database forum for better support.
Best regards,
Kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
Monday, January 25, 2016 11:16 PM
Hi Saravanan,
Could you please provide me with some details of your retry logic. There are a couple of
ways in which you can go about implementing the retry logic:
1) You are currently using entity framework (EF) to handle this. I think you are using the
‘SqlAzureExecutionStrategy’ in the entity framework which in turn calls the
‘DbExecutionStrategy’ which has exponential backoff as the inbuilt mechanism.
2) If your application performance degrades with exponential back off then retrying
linearly after 5.5sec is ideal. The .NET client caches the error message for
5sec so even if you retry within this time period it will just send you the
cached message.
3) If you are getting a lots of time out then timeout recommended is 30 sec for SQL
Azure.
4) Also I would highly recommend connection pooling, the details are here: https://msdn.microsoft.com/library/8xx3tyca.aspx
As for the errors that you getting can you please send me the server name and the database
name at [email protected] if possible with the duration of the outages and frequencies?
Regards
Dhruv