cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Warehousing & Analytics
Engage in discussions on data warehousing, analytics, and BI solutions within the Databricks Community. Share insights, tips, and best practices for leveraging data for informed decision-making.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

ODBC v2.12- 503 "no Retry-After header"

saf_dbx
New Contributor II

I'm connecting to a Databricks catalog via a SQL Warehouse using the Databricks ODBC Driver (v2.12.0). During one of the fetches from my BI application, the transaction aborts with:

Database operation [SQLExecute] failed with error [[Databricks][Hardy] (124) A 503 response was returned but no Retry-After header was provided. Original error: Unknown]

I've seen references to a driver parameter called `EnableRetryWithoutRetryAfterHeader` that's supposed to make the driver retry a 503 even without a `Retry-After` header, but I can't find this documented in official Databricks ODBC docs.

This error doesn't come all the time, and most of the time it works okay. 

Can anyone confirm:
If such a parameter exists, how can one configure this on the DSN settings? 

Thanks in advance for any pointers.

2 REPLIES 2

ThomazNeto
Databricks Partner

Hi,

I've hit this exact error in a few environments, so maybe this helps.

First, the 503 itself is coming from the Databricks side, not from your BI tool or the driver. In every case I've traced it, the timestamps lined up with the SQL Warehouse being in a transitional state: auto-stop / cold start, scaling up or down, or a node being replaced. The service answers 503 for a few seconds and then recovers on its own. Worth cross-checking your failure times against the warehouse events and Query History.

What makes it fatal is the driver behavior. Out of the box, the ODBC driver only retries a 503 when the server includes a Retry-After header, and Databricks doesn't always send one. Without the header the driver gives up immediately and you get the Hardy (124) error.

About the parameter: EnableRetryWithoutRetryAfterHeader does exist, but you won't find it in the Databricks docs. I couldn't find it in the docs.databricks.com ODBC pages or in the release notes from 2.9.1 up to 2.12.1. The only place I've seen it written down is a Qlik support article from May this year, which says it's available from driver 2.9.1 onward and defaults to 0. It's one of those "key name only" options that don't show up in the DSN dialog.

To set it:

Windows: open regedit, navigate to HKEY_LOCAL_MACHINE, then SOFTWARE, then ODBC, then ODBC.INI, then your DSN name, and add a string value named EnableRetryWithoutRetryAfterHeader with value 1. Or append it to the connection string if your BI tool lets you.

Linux/macOS: add the line EnableRetryWithoutRetryAfterHeader=1 to the DSN section in odbc.ini.

DSN-less connection string: add EnableRetryWithoutRetryAfterHeader=1 as one more semicolon-separated property.

You're on 2.12.0, so version isn't a problem.

On the warehouse side, if this happens a lot, look at the auto-stop setting (extend it or disable it during the refresh window), or move to Serverless, which starts in seconds and cuts down on the cold-start 503s considerably. If you want proof for a support ticket, turn on driver logging (LogLevel=4 plus LogPath) and you should see the raw 503 with no Retry-After in the trace.

One caveat: since the parameter isn't officially documented by Databricks, I'd test it in your environment before rolling it out broadly. It's been stable where I've used it, but I can't point you to an official Databricks reference for it.

Hope this helps.

Thomaz A. Rossito Neto
Principal Data & AI โ€” CI&T
thomazn@ciandt.com
linkedin.com/in/thomaz-antonio-rossito-neto

saf_dbx
New Contributor II

Thanks I will try setting the parameter and see if that will help. The databricks SQL Warehouse is already serverless in my case.