SQL Database serverless instance paused — cold start delay
First query after idle period takes 30-60 seconds (cold start)
Focused incident mode — strips away everything but this runbook.
Symptoms
- First query after idle period takes 30-60 seconds (cold start)
- az sql db show returns status Paused or autoPauseDelay elapsed
- Application timeouts on first connection after an idle window
Evidence to grab
Collect these artifacts before you change anything — they prove (or rule out) each cause.
Database current status
az sql db show --server <SERVER> --database <DB> --resource-group <RG> --query "{status:status}" -o jsonAuto-pause delay configuration
az sql db show --server <SERVER> --database <DB> --resource-group <RG> --query autoPauseDelay -o tsv
Diagnostic flow
Run the steps in order, marking each claim confirmed or refuted. The evidence you gather feeds the ranked causes below.
Guided decision tree is ready.
Steps with commands, expected output, and pass/fail branches.
Ranked root causes
Evidence checklist
- autoPauseDelay is set (default 60 minutes)
- Database status = Paused after an idle window
Confirm before fixing
az sql db show --server <SERVER> --database <DB> --resource-group <RG> --query "{status:status,autoPauseDelay:autoPauseDelay}" -o jsonConfirm auto-pause settings
Fix
az sql db update --server <SERVER> --database <DB> --resource-group <RG> --set autoPauseDelay=0Disable auto-pause by setting delay to 0
Expected: Database '<DB>' updated.
Resolution runbook
Apply from top to bottom after the cause is confirmed. Review every command before running it — risk tags are shown on each.
az sql db show --server <SERVER> --database <DB> --resource-group <RG> --query "{status:status,autoPauseDelay:autoPauseDelay}" -o jsonCheck current state and auto-pause
az sql db resume --server <SERVER> --database <DB> --resource-group <RG>Resume the paused database
az sql db update --server <SERVER> --database <DB> --resource-group <RG> --set autoPauseDelay=0Disable auto-pause for always-on workloads
Prevention
- Disable auto-pause for production databases that must always be warm.
- Set minCapacity >= 2 for serverless databases with latency requirements.
- Use connection retry logic in the application with exponential backoff.
- Monitor pause/resume events with Azure Monitor alerts.
Related runbooks
Same stack, same failure family — worth a skim.
Query timeout errors (timeout expired) from the application
Client error: Cannot open server. Login failed. Client IP not allowed
Commands marked READ CHANGE DESTRUCTIVE — never run DESTRUCTIVE commands against production data you cannot restore. Copy → verify → execute.