TinkerLab
DIAGNOSTIC TREE // N8N-WORKFLOW-LLM-FAILURE (2 ROOT CAUSES)

n8n / Automation Workflow Local LLM Node Failures

Resolve batch concurrency queue timeouts, markdown-wrapped JSON failures, and infinite error retry loops.

[KEY VERIFIED TAKEAWAY / TL;DR]This diagnostic decision tree for "n8n / Automation Workflow Local LLM Node Failures" provides 3 interactive nodes and 2 hardware-verified root-cause fixes (Fix: Serialize Requests with Loop Over Items (Batch Size = 1–2); Fix: Pass "format": "json" in Ollama API Body & Add Fallback Parser), paired with our reproducible guide "n8n-local-llm-rss-pipeline".
n8n / Automation Workflow Local LLM Node Failures
Step 1: What Error Does the n8n Execution Log Show?

Open the failed execution in n8n and inspect the HTTP Request / AI Agent node error details.

Diagnostic Probe Command

Select what your environment outputs:
DIAGNOSTIC PROBE SEQUENCE // 完整分步探测命令与症状分支

All 1 Terminal Diagnostic Probes in "n8n / Automation Workflow Local LLM Node Failures"

Complete static reference of every read-only probe command, baseline hint, and branch transition in this decision tree.

Step 1: What Error Does the n8n Execution Log Show?step-n8n-error-type

Open the failed execution in n8n and inspect the HTTP Request / AI Agent node error details.

Symptom Branches:
  • • First 1–2 items succeed, then subsequent items fail with ETIMEDOUT→ sol-n8n-split-in-batches
  • • Downstream node fails because LLM wrapped JSON in ```json ... ``` fences→ sol-n8n-format-json-enforce
ALL VERIFIED FIXES IN THIS TREE // 本树涵盖的全部根因与修复方案一览

2 Verified Root Causes, Fix Configs & Commands in "n8n / Automation Workflow Local LLM Node Failures"

Fix: Serialize Requests with Loop Over Items (Batch Size = 1–2)

sol-n8n-split-in-batches

When an RSS feed returns 30 items, n8n fires requests faster than a single local GPU can process. Queued requests exceed the node timeout before inference starts.

  1. Insert a Loop Over Items (Split in Batches) node with Batch Size = 1 before the local LLM node.
  2. Set HTTP Request Timeout to 45000 ms and enable Retry On Fail (Max Tries: 3, Wait: 3000 ms).
// Recommended n8n HTTP Request Node Options for Local LLMs
{
  "batching": { "batch": { "batchSize": 1, "batchInterval": 500 } },
  "timeout": 45000,
  "retryOnFail": true,
  "maxTries": 3,
  "waitBetweenTries": 3000
}

[BOUNDARY]Matching batch size to OLLAMA_NUM_PARALLEL prevents VRAM thrashing and queue timeouts.

Verify: ollama ps

Fix: Pass "format": "json" in Ollama API Body & Add Fallback Parser

sol-n8n-format-json-enforce

Asking for JSON only in the prompt text is not deterministic; small quantized models occasionally add conversational preambles or markdown code fences.

  1. Set `"format": "json"` (or JSON Schema in Ollama 0.5+) at the grammar sampler level.
  2. Enable `continueOnFail: true` so a single malformed item routes to an error branch instead of halting the whole batch.
// Ollama grammar-constrained JSON request body
{
  "model": "qwen2.5:7b",
  "format": "json",
  "stream": false,
  "options": { "temperature": 0.1 },
  "prompt": "Return JSON with keys {category, summary}: ..."
}

[BOUNDARY]Important: When format: "json" is enabled, you MUST also mention the word "JSON" in the prompt text.

Verify: curl -s http://127.0.0.1:11434/api/generate -d '{"model":"qwen2.5:7b","format":"json","stream":false,"prompt":"Return JSON {ok:true}"}'
PAIRED REPRODUCIBLE GUIDE // 配套实测指南与硬件环境基线

n8n + Local LLM RSS Classifier: Importable Workflow, Deduplication & Retry Branches

A production-ready n8n workflow that fetches RSS feeds, deduplicates URLs, classifies items via local Ollama with strict JSON output, and handles queue timeouts.

TESTED HARDWARE & OS

Self-hosted n8n (Docker) + Local Ollama (Qwen2.5-7B-Instruct Q4_K_M)

PINNED STACK VERSIONS

n8n 1.76.x · Ollama 0.5.7 · qwen2.5:7b

VERIFIED (2026-10-23)

Outbound RSS Fetch Only · 100% Local AI Inference — Zero cloud LLM API token cost; article bodies never leave your machine.