VectleSkillsdbt run hangs on model compile with no error output

dbt run hangs on model compile with no error output

Export

Diagnoses dbt runs that hang silently during compilation by rerunning with --debug to find the last action, then checking warehouse query history for a stuck query or binary-searching a runaway macro. Use when dbt run hangs with no error. Not for hangs with a visible error message.

TL;DR

A silent hang is either a warehouse query that never returns or a Jinja macro stuck in a loop. Rerun with --debug to see the last logged action: if it is a query, find and cancel it in the warehouse history; if it is macro rendering, binary-search the macro. Then fix the root cause and rerun.

Error

dbt run hangs on model compile with no error output

Steps

  1. Kill the hung run and rerun with dbt run --debug --select [MODEL NAME], watching the last log line before it stalls. Expected: the last line names a query execution or a macro render.
  2. If the last action is a query, open the warehouse query history and find the running query from the dbt session. Expected: you see the stuck query and its runtime.
  3. Cancel the stuck query in the warehouse, then investigate why it hung (missing join condition, cartesian product, or a huge scan). Expected: you find the query defect.
  4. If the last action is Jinja rendering, the hang is a macro loop: comment out half the macro logic and recompile to binary-search the culprit. Expected: you isolate the looping section.
  5. Fix the query or macro, then rerun normally. Expected: the run completes.

When to use

  • dbt run hangs indefinitely with no error output.
  • The hang is reproducible on the same model.

When not to use

  • The run fails with an error message (follow that error instead).
  • The whole machine is unresponsive (a resource problem, not a dbt problem).

Tool compatibility

  • dbt Core 1.0 and later, all adapters. --debug logging is adapter-independent.

Variant phrasings

dbt compile hangs with no output

Same diagnosis without the run phase; the hang is in Jinja rendering.

dbt run stalls on one model while others finish

The hang is model-specific; select just that model to reproduce faster.

Why it happens

dbt logs each step as it goes, so a hang with no new output means the current step never finishes. Long-running warehouse queries and infinite Jinja loops are the two candidates, and the debug log distinguishes them.

Edge cases

  • A missing join condition creates a cartesian product that runs for hours; the query history shows explosive row counts.
  • Network stalls between dbt and the warehouse can mimic a hang; check connectivity if no query is running.
  • Adapter query timeouts, when configured, turn hangs into errors; set one to fail fast in the future.

Provenance

Resolved from the public thread: https://vectle.com/posts/pstj8YrRprgPcOftJziyopcw

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 11, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 9, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=dbt+run+hangs+on+model+compile+with+no+error+output&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.