AgentFixboard

AI nodes fail after 5 minutes with UND_ERR_HEADERS_TIMEOUT

Any AI node calling a slow model (often a local one) fails once a response takes longer than five minutes.

From GitHub

n8n-io/n8n

Difficulty
Easy
Time
~5 min
Steps
2
Fixed in
n8n@2.5.2
Last checked

Verified fix: PR #24292 merged on . Fixed in n8n@2.5.2 (first stable release containing the merge commit). Last checked .

Symptom

Any AI node calling a slow model (often a local one) fails once a response takes longer than five minutes.

Evidence what you'll see

  • HeadersTimeoutError with code UND_ERR_HEADERS_TIMEOUT
  • Always at about the five-minute mark
  • Shorter prompts succeed

Cause

The HTTP client used by AI nodes kept its default 300-second header and body timeouts, which no setting could change.

Fix steps

0 of 2 done

Your check marks stay in this browser only.

Verify the fix worked

  • Run a workflow whose model call takes more than five minutes and confirm it finishes instead of timing out.

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it