[GH-ISSUE #4174] [Issue]: HeadersTimeoutError when refreshing Noodle timeline #2260

Closed
opened 2026-10-21 05:46:46 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @SpicyMarinara on GitHub (Jul 27, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4174

Originally assigned to: @Gunterlie on GitHub.

Summary

Refreshing the timeline in Noodle fails after several minutes with a HeadersTimeoutError and displays "fetch failed." The same error occurs during automatic timeline refresh.

Expected behavior

The Noodle timeline should refresh successfully when using a slow local model, or provide a configurable timeout that applies to timeline refresh requests.

Actual behavior

Manual and automatic timeline refreshes wait several minutes, then fail with a HeadersTimeoutError and display "fetch failed" on the webpage.

Steps to reproduce

  1. Run Marinara Engine v2.3.4 with a local model.
  2. Open Noodle.
  3. Click "Refresh timeline" or wait for the automatic refresh.
  4. Wait several minutes.
  5. Observe that the refresh fails with "fetch failed" and a HeadersTimeoutError.

Environment

  • Marinara Engine version: v2.3.4
  • Install type: installer
  • OS + version: Windows 10
  • Browser or app shell: Not provided

Logs, screenshots, or video

{"level":50,"time":1785136356840,"pid":19108,"hostname":"DPC","err":{"type":"TypeError","message":"fetch failed: Headers Timeout Error","stack":"TypeError: fetch failed\ncaused by: HeadersTimeoutError: Headers Timeout Error\n at FastTimer.onParserTimeout [as_onTimeout] (E:\AI_Marinara-Engine\Marinara-Engine\.pnpm\undici@7.25.0\node_modules\undici\lib\dispatcher\client-h1.js:749:28)\n at Timeout.onTick [as_onTimeout] (E:\AI_Marinara-Engine\Marinara-Engine\.pnpm\undici\lib\util\timers.js:162:13)\n at listOnTimeout (node:internal/timers.js:541:7)"},"msg":"[noodle] Timeline refresh failed"}

Additional context

The user runs a potentially slow local model. They increased all TIMEOUT-related values found in .env.example within their .env file, including CHAT_GENERATION_TIMEOUT_MS=3600000, but the error persisted.

Discord thread: Issue Report: HeadersTimeoutError when clicking "Refresh timeline" in Noodle
Discord thread link: https://discord.com/channels/1417099416812392641/1531282465111543838
Requested by: gunterlie (gunterlie, Discord ID 282074442962829312)

Discord thread transcript (9 messages)
[2026-07-27T12:49:49.535Z] Ds: Hello developers! ❤️

(Note: Since English is not my native language, I have asked Professor Mari to draft this on my behalf. I hope you can forgive me for this! 🙏)

Thank you so much for your prompt response to my report yesterday! I truly appreciate your help.

I've encountered a "HeadersTimeoutError" when clicking the "Refresh timeline" button in Noodle. After waiting a few minutes, the error appears and the webpage displays "fetch failed." 
I have also noticed that the same "HeadersTimeoutError" occurs with the automatic refresh.

**Attempted Fixes:**
To try and resolve this, I searched for all entries containing the word "TIMEOUT" in the `.env.example` file and increased those values within my `.env` file (including `CHAT_GENERATION_TIMEOUT_MS=3600000`), but the error persists.

**Error Log:**
` ` `
{"level":50,"time":1785136356840,"pid":19108,"hostname":"DPC","err":{"type":"TypeError","message":"fetch failed: Headers Timeout Error","stack":"TypeError: fetch failed\ncaused by: HeadersTimeoutError: Headers Timeout Error\n    at FastTimer.onParserTimeout [as_onTimeout] (E:\\AI_Marinara-Engine\\Marinara-Engine\\.pnpm\\undici@7.25.0\\node_modules\\undici\\lib\\dispatcher\\client-h1.js:749:28)\n    at Timeout.onTick [as_onTimeout] (E:\\AI_Marinara-Engine\\Marinara-Engine\\.pnpm\\undici\\lib\\util\\timers.js:162:13)\n    at listOnTimeout (node:internal/timers.js:541:7)"},"msg":"[noodle] Timeline refresh failed"}
` ` `

**Context:**
- OS version: Windows 10
- Installation method: Windows installer
- Current version of Marinara Engine: v2.3.4
- Chatting mode: Noodle
- I am running a local model, so it might be running a bit slow.

Is there a way to configure the waiting time for this specific action to prevent this timeout?

Thank you again for all your incredible work on the engine! 😊
[Discord message: https://discord.com/channels/1417099416812392641/1531282465111543838/1531282465111543838]

[2026-07-27T13:01:04.960Z] Marinara: @gunterlie
[Discord message: https://discord.com/channels/1417099416812392641/1531282465111543838/1531285298049454180]

[2026-07-27T13:01:18.088Z] Marinara: sorry for pinging you, you seem to be working on noodle and noodler recently so that's why lol
[Discord message: https://discord.com/channels/1417099416812392641/1531282465111543838/1531285353112014939]

[2026-07-27T13:01:33.081Z] Marinara: wait
[Discord message: https://discord.com/channels/1417099416812392641/1531282465111543838/1531285415997210675]

[2026-07-27T13:01:37.007Z] Marinara: I remember adding timeout for noodle
[Discord message: https://discord.com/channels/1417099416812392641/1531282465111543838/1531285432464052294]

[2026-07-27T13:01:39.434Z] Marinara: or am i tripping
[Discord message: https://discord.com/channels/1417099416812392641/1531282465111543838/1531285442643628258]

[2026-07-27T13:04:01.366Z] gunterlie: I also think we had that, but I also don’t think I removed something in NoodlE.
[Discord message: https://discord.com/channels/1417099416812392641/1531282465111543838/1531286037949583370]

[2026-07-27T13:04:34.975Z] gunterlie: Will put an Agent on the case
[Discord message: https://discord.com/channels/1417099416812392641/1531282465111543838/1531286178916073582]

[2026-07-27T13:04:51.756Z] gunterlie: https://klipy.com/gifs/stalking-spying
Man Spying from Behind a Gate
[Discord message: https://discord.com/channels/1417099416812392641/1531282465111543838/1531286249300820101]

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Jul 27, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4174 Originally assigned to: @Gunterlie on GitHub. ## Summary Refreshing the timeline in Noodle fails after several minutes with a HeadersTimeoutError and displays "fetch failed." The same error occurs during automatic timeline refresh. ## Expected behavior The Noodle timeline should refresh successfully when using a slow local model, or provide a configurable timeout that applies to timeline refresh requests. ## Actual behavior Manual and automatic timeline refreshes wait several minutes, then fail with a HeadersTimeoutError and display "fetch failed" on the webpage. ## Steps to reproduce 1. Run Marinara Engine v2.3.4 with a local model. 2. Open Noodle. 3. Click "Refresh timeline" or wait for the automatic refresh. 4. Wait several minutes. 5. Observe that the refresh fails with "fetch failed" and a HeadersTimeoutError. ## Environment - Marinara Engine version: v2.3.4 - Install type: installer - OS + version: Windows 10 - Browser or app shell: Not provided ## Logs, screenshots, or video {"level":50,"time":1785136356840,"pid":19108,"hostname":"DPC","err":{"type":"TypeError","message":"fetch failed: Headers Timeout Error","stack":"TypeError: fetch failed\ncaused by: HeadersTimeoutError: Headers Timeout Error\n at FastTimer.onParserTimeout [as_onTimeout] (E:\\AI_Marinara-Engine\\Marinara-Engine\\.pnpm\\undici@7.25.0\\node_modules\\undici\\lib\\dispatcher\\client-h1.js:749:28)\n at Timeout.onTick [as_onTimeout] (E:\\AI_Marinara-Engine\\Marinara-Engine\\.pnpm\\undici\\lib\\util\\timers.js:162:13)\n at listOnTimeout (node:internal/timers.js:541:7)"},"msg":"[noodle] Timeline refresh failed"} ## Additional context The user runs a potentially slow local model. They increased all TIMEOUT-related values found in .env.example within their .env file, including CHAT_GENERATION_TIMEOUT_MS=3600000, but the error persisted. Discord thread: Issue Report: HeadersTimeoutError when clicking "Refresh timeline" in Noodle Discord thread link: https://discord.com/channels/1417099416812392641/1531282465111543838 Requested by: gunterlie (gunterlie, Discord ID 282074442962829312) <details> <summary>Discord thread transcript (9 messages)</summary> ```text [2026-07-27T12:49:49.535Z] Ds: Hello developers! ❤️ (Note: Since English is not my native language, I have asked Professor Mari to draft this on my behalf. I hope you can forgive me for this! 🙏) Thank you so much for your prompt response to my report yesterday! I truly appreciate your help. I've encountered a "HeadersTimeoutError" when clicking the "Refresh timeline" button in Noodle. After waiting a few minutes, the error appears and the webpage displays "fetch failed." I have also noticed that the same "HeadersTimeoutError" occurs with the automatic refresh. **Attempted Fixes:** To try and resolve this, I searched for all entries containing the word "TIMEOUT" in the `.env.example` file and increased those values within my `.env` file (including `CHAT_GENERATION_TIMEOUT_MS=3600000`), but the error persists. **Error Log:** ` ` ` {"level":50,"time":1785136356840,"pid":19108,"hostname":"DPC","err":{"type":"TypeError","message":"fetch failed: Headers Timeout Error","stack":"TypeError: fetch failed\ncaused by: HeadersTimeoutError: Headers Timeout Error\n at FastTimer.onParserTimeout [as_onTimeout] (E:\\AI_Marinara-Engine\\Marinara-Engine\\.pnpm\\undici@7.25.0\\node_modules\\undici\\lib\\dispatcher\\client-h1.js:749:28)\n at Timeout.onTick [as_onTimeout] (E:\\AI_Marinara-Engine\\Marinara-Engine\\.pnpm\\undici\\lib\\util\\timers.js:162:13)\n at listOnTimeout (node:internal/timers.js:541:7)"},"msg":"[noodle] Timeline refresh failed"} ` ` ` **Context:** - OS version: Windows 10 - Installation method: Windows installer - Current version of Marinara Engine: v2.3.4 - Chatting mode: Noodle - I am running a local model, so it might be running a bit slow. Is there a way to configure the waiting time for this specific action to prevent this timeout? Thank you again for all your incredible work on the engine! 😊 [Discord message: https://discord.com/channels/1417099416812392641/1531282465111543838/1531282465111543838] [2026-07-27T13:01:04.960Z] Marinara: @gunterlie [Discord message: https://discord.com/channels/1417099416812392641/1531282465111543838/1531285298049454180] [2026-07-27T13:01:18.088Z] Marinara: sorry for pinging you, you seem to be working on noodle and noodler recently so that's why lol [Discord message: https://discord.com/channels/1417099416812392641/1531282465111543838/1531285353112014939] [2026-07-27T13:01:33.081Z] Marinara: wait [Discord message: https://discord.com/channels/1417099416812392641/1531282465111543838/1531285415997210675] [2026-07-27T13:01:37.007Z] Marinara: I remember adding timeout for noodle [Discord message: https://discord.com/channels/1417099416812392641/1531282465111543838/1531285432464052294] [2026-07-27T13:01:39.434Z] Marinara: or am i tripping [Discord message: https://discord.com/channels/1417099416812392641/1531282465111543838/1531285442643628258] [2026-07-27T13:04:01.366Z] gunterlie: I also think we had that, but I also don’t think I removed something in NoodlE. [Discord message: https://discord.com/channels/1417099416812392641/1531282465111543838/1531286037949583370] [2026-07-27T13:04:34.975Z] gunterlie: Will put an Agent on the case [Discord message: https://discord.com/channels/1417099416812392641/1531282465111543838/1531286178916073582] [2026-07-27T13:04:51.756Z] gunterlie: https://klipy.com/gifs/stalking-spying Man Spying from Behind a Gate [Discord message: https://discord.com/channels/1417099416812392641/1531282465111543838/1531286249300820101] ``` </details> ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:46:46 +07:00
Author
Owner

@Gunterlie commented on GitHub (Jul 27, 2026):

Picked this up — draft PR #4175 (base staging).

Root cause: llmFetch hard-coded undici's headersTimeout (time to first byte) to 5 minutes. CHAT_GENERATION_TIMEOUT_MS only reached undici via withLlmRequestTimeout, which only the chat, Game, and long-term-memory paths use. Noodle calls provider.chatComplete directly with stream: false, so it always got the fixed 5 minutes — which is why raising the env var did nothing. @Gunterlie the Noodle timeout you remembered exists, it just never reached the fetch layer.

Fix: the default headers timeout now reads CHAT_GENERATION_TIMEOUT_MS, so the existing variable covers Noodle and other background generation. Default unchanged at 5 minutes, so slow local models still need to raise it.

<!-- gh-comment-id:5091914891 --> @Gunterlie commented on GitHub (Jul 27, 2026): Picked this up — draft PR #4175 (base `staging`). Root cause: `llmFetch` hard-coded undici's `headersTimeout` (time to first byte) to 5 minutes. `CHAT_GENERATION_TIMEOUT_MS` only reached undici via `withLlmRequestTimeout`, which only the chat, Game, and long-term-memory paths use. Noodle calls `provider.chatComplete` directly with `stream: false`, so it always got the fixed 5 minutes — which is why raising the env var did nothing. @Gunterlie the Noodle timeout you remembered exists, it just never reached the fetch layer. Fix: the default headers timeout now reads `CHAT_GENERATION_TIMEOUT_MS`, so the existing variable covers Noodle and other background generation. Default unchanged at 5 minutes, so slow local models still need to raise it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2260
No description provided.