mediumIntermediateSymptom-first#sql-database#serverless#paused#cold-start#auto-pause

SQL Database serverless instance paused — cold start delay

First query after idle period takes 30-60 seconds (cold start)

Likely source:availabilityperformance

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 json
  • Auto-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 json
READ

Confirm auto-pause settings

Fix

az sql db update --server <SERVER> --database <DB> --resource-group <RG> --set autoPauseDelay=0
CHANGE

Disable 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.

1
az sql db show --server <SERVER> --database <DB> --resource-group <RG> --query "{status:status,autoPauseDelay:autoPauseDelay}" -o json
READ

Check current state and auto-pause

2
az sql db resume --server <SERVER> --database <DB> --resource-group <RG>
CHANGE

Resume the paused database

3
az sql db update --server <SERVER> --database <DB> --resource-group <RG> --set autoPauseDelay=0
CHANGE

Disable 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.

Commands marked READ CHANGE DESTRUCTIVE — never run DESTRUCTIVE commands against production data you cannot restore. Copy → verify → execute.