mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3958] [Issue]: Local LLM model's can time out if generation takes longer than 600 seconds, even when streaming. #2135
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#2135
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Sciguy429 on GitHub (Jul 23, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3958
Originally assigned to: @SpicyMarinara on GitHub.
Summary
My local LLM's are 'failing' JSON parser validation when running as agents, despite generating valid JSON. Marinara Engine is canceling the task midway through and then rejecting the incomplete response.
Expected behavior
Local endpoints should not be restricted by typical endpoint timeout constraints. Most of my model's run at 10-15 tk/s and can take a good 2-3 minutes to prompt process a long context window chat. This is expected behavior for a local instance and the timeout should be configurable within the connection settings.
Actual behavior
LLama.cpp reports the task as 'canceled' and the web console from Marinara Engine shows a partial but not malformed JSON response:
Response as listed in console (with the story data omitted):

The final line of JSON shows it getting cut off midway through the generation:
Steps to reproduce
Environment
Additional context
I have had this exact issue with a number of LLM tools at this point. Mainly Killocode and other VSCode based harnesses. The ideal solution for all of these in the past had been to add a configuration option for the timout to allow it to be disabled for local instances (and in some cases, add a defaults check which shuts it off automatically for known local address ranges: 127.0.0.1, 192.168.X.X and 10.10.X.X).
Furthermore, in reference to my previous issue from yesterday #3931 it seems this was actually the root cause. Of my local models:
After figuring out that the debug logs are in the browser and not the terminal, I checked and none of the failing models are responding with invalid JSON data, they are all getting cut off on the same manner as the logs I provided above.
(Also apologies if this technically counts as a feature request and not a bug. Wasn't sure which one to put it under.)
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Jul 23, 2026):
Hey pookie, you can edit the
CHAT_GENERATION_TIMEOUT_MSin your.envfile to lengthen it.https://github.com/Pasta-Devs/Marinara-Engine/blob/main/docs/CONFIGURATION.md#timeouts
@Sciguy429 commented on GitHub (Jul 24, 2026):
I have added some timeout overrides to my config and am still getting the issue:
The first agent pass for the HTML agent is still bound by the 300s timeout, but the second is now bound by a 600s timeout for some reason:

I am not sure at all what is going on here. Did I mess up the file formatting in some way?
@SpicyMarinara commented on GitHub (Jul 24, 2026):
No, these should be respected. I'll investigate.
@SpicyMarinara commented on GitHub (Jul 24, 2026):
Root cause found and fixed in draft PR #4025 (owned by @SpicyMarinara, Claude agent session).
Your
.envwas correct — the override just wasn't wired to agents. Agent LLM calls (the HTML reformatter, trackers, etc.) never readCHAT_GENERATION_TIMEOUT_MS; they were bounded by a hardcoded 300s total-duration cap, which is why a healthy model streaming at ~15 tk/s still got cancelled at exactly 5 minutes.The "second pass bound by 600s" you saw is the automatic invalid-JSON retry: when the first pass is cut at 300s the truncated output fails validation, and the retry runs with a fresh 300s signal — so 300 + 300 ≈ 600s of wall-clock. Not a different timeout.
The PR adds a dedicated
AGENT_CALL_TIMEOUT_MS(10s–1h, hot-reloaded like the chat one). Setting e.g.AGENT_CALL_TIMEOUT_MS=1800000will let your slower models finish. Once it's merged to staging you'll be able to test it.