Lesson Learned #320:Database 'XXX' on server 'xyz' is not currently available using ServerLess tier.
Published Feb 06 2023 02:21 AM 40.4K Views

Today, we got a new service request that our customer faced the following error message: Database 'XXX' on server 'xyz.database.windows.net' is not currently available. Please retry the connection later. If the problem persists, contact customer support, and provide them the session tracing ID of '{XXXXX7B5-BFBE-437D-A34D-NNNNNN}'. (.Net SqlClient Data Provider)

 

After checking our internal telemetry data we found all of login failures mentioned are due to Auto-Pause/Resume for Serverless DB tier.


This Azure SQL DB is Serverless DB; Serverless is price-performance optimized for single databases with intermittent, unpredictable usage patterns that can afford some delay in compute warm-up after idle usage periods (default value is 60 minutes).

The Serverless DB is activating due to user connections, before DB is resumed, connections could fail with 40613 error and the latency to auto-resume is generally on the order of 1 minute as mentioned below in https://docs.microsoft.com/en-us/azure/azure-sql/database/serverless-tier-overview#connectivity documentation.


Building resiliency into your application to account for these situations can help create transparency to the end user when these transient scenarios occur.

Shared Documentation:

Enjoy!

 

Version history
Last update:
‎Feb 06 2023 02:22 AM
Updated by: