n8n · tool · fg-0341

n8n AI node fails with UND_ERR_HEADERS_TIMEOUT when a local model takes over five minutes

If you see { "name": "HeadersTimeoutError", "code": "UND_ERR_HEADERS_TIMEOUT" }, the cause and the fix for n8n are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
{ "name": "HeadersTimeoutError", "code": "UND_ERR_HEADERS_TIMEOUT" }Ollama or local LLM calls die at exactly 5 minutesRaising the node timeout option changes nothing
Cause
Before 2.5.0 the HTTP client used by AI nodes had a fixed 300 second header timeout. From 2.5.0 the limit comes from N8N_AI_TIMEOUT_MAX, which defaults to one hour.
Fix
Upgrade to 2.5.0 or later and set N8N_AI_TIMEOUT_MAX in milliseconds if you need more than one hour.
Apply
N8N_AI_TIMEOUT_MAX=7200000
Affected
n8n before 2.5.0 with AI nodes against slow or local models
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun