Hello Barrow, Adam
I understand that you have been experiencing Azure SQL database unavailability issues for the past 3 days, with the issue resolving automatically after 3 minutes. You would like to know the root cause and how to prevent this from happening again.
Error message:
SQL database is unavailable at this time. Currently, Azure shows the downtime for your SQL database resource at a two-minute granularity. The actual downtime is likely less than a minute – average is 2s.
Following our discussion, I noticed that your Azure SQL database is in the Serverless Service tier, which automatically pauses databases during inactive periods, billing only for storage, and resumes databases when activity returns.
Please note that when the Azure SQL database attempts to come back online, the first connection will receive an error indicating the database is unavailable. On the second connection, it will be back online.
Due to the serverless compute tier behavior, you encountered unavailable errors in the resource health, which were resolved once the database was back online.
Kindly please refer the below documentation for better understanding about the serverless compute tier,
https://learn.microsoft.com/en-us/azure/azure-sql/database/serverless-tier-overview?view=azuresql&tabs=general-purpose#overview
Also, I recommend you to please configure the alerts for future outages, because the advance notifications are available for databases configured to use a nondefault maintenance window. Advance notifications enable to configure notifications to be sent up to 24 hours in advance of any planned event.
https://learn.microsoft.com/en-us/azure/azure-sql/database/advance-notifications?view=azuresql
I hope this has been helpful!
Your feedback is important so please take a moment to accept answers. If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!
If this answers your query, do click Accept Answer and Yes for was this answer helpful.