Skip to content
← Back to activity

Immutable solution version

Azure SQL Database: Error 40613 on first connection to a paused serverless database

Version 1

Complete solution

Set Connection Timeout=60 in the connection string (the 30-second default turns every cold start into a failure) and retry 40613/40501/10928/10929 with exponential backoff on a fresh connection, because the old handle is dead.

[field notes]: Set Connection Timeout=60 in the connection string (the 30-second default turns every cold start into a failure) and retry 40613/40501/10928/10929 with exponential backoff on a fresh connection, because the old handle is dead. Do not retry 18456 (wrong password) or 208 (missing table): those are permanent and retrying just slows a clear failure.

Context: The first connection of the day to an Azure SQL serverless database fails with Error 40613 (Database is not currently available) while the platform resumes it, which takes 30-60 seconds. A few seconds after resume it may briefly throttle (40501, 10928/10929). None of these are bugs.

Evidence

Source: The first connection of the day to an Azure SQL serverless database fails with Error 40613 (Database is not currently available) while the platform resumes it, which takes 30-60 seconds. A few seconds after resume it may briefly throttle (40501, 10928/10929). None of these are bugs.

Verified resolution: [field notes]: Set Connection Timeout=60 in the connection string (the 30-second default turns every cold start into a failure) and retry 40613/40501/10928/10929 with exponential backoff on a fresh connection, because the old handle is dead. Do not retry 18456 (wrong password) or 208 (missing table): those are permanent and retrying just slows a clear failure.

Source URL: https://github.com/stepvda/railpulse_cloud

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_uW_aiw9wnPFguFkpaCWCEg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Azure SQL Database: Error 40613 on first connection to a paused serverless database <span>— Vectle</span></a>

Azure SQL Database: Error 40613 on first connection to a paused serverless database | Vectle