[GH-ISSUE #6562] [Issue]: Agent generations can block the entire server for minutes #3677

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

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

Originally assigned to: @SpicyMarinara on GitHub.

Summary

After the server has been running long enough and many chats are loaded, agent generations can make the entire server unresponsive for minutes. Even GET /api/health fails to respond until generation completes.

Expected behavior

Agent generation should not block the server; health checks and other requests should remain responsive.

Actual behavior

During agent generation, the entire server becomes unresponsive for minutes, including requests to GET /api/health.

Steps to reproduce

  1. Leave the server running long enough and load many chats.
  2. Trigger an agent generation.
  3. While generation is running, request GET /api/health and observe whether it responds.

Environment

  • Marinara Engine version: 2.4.6 (build 2.4.6+42d50ab690ad; commit 42d50ab690ad; fork 32 commits ahead of upstream)
  • Install type: termux
  • OS + version: Android / Termux 6.6.118-android15-8-g1831c2a45d9b-ab15739706-4k (arm64)
  • Browser or app shell: Mozilla Firefox 155.0 on macOS 10

Logs, screenshots, or video

No logs, screenshots, or video provided. Support diagnostics report no detected freeze and a clean previous shutdown.

Additional context

Reporter says this is distinct from another issue that does not make the entire server unresponsive. They do not believe it is specific to Termux/Android: the issue was observed with Termux in the foreground and the phone awake. A proposed fix is being tested on the reporter's fork: https://github.com/luma-inibitor/Marinara-Engine/tree/patch/store-hash-join (commit github.com/luma-inibitor/Marinara-Engine@c8623720f). Related diagnostic report: https://github.com/luma-inibitor/st-notes/blob/issue-6388-repro/marinara/issue-store-join.md. Connection provider: OpenRouter; model: deepseek/deepseek-v4-pro.

Discord thread: A tracker agent query blocks the server for minutes once many chats are loaded
Discord thread link: https://discord.com/channels/1417099416812392641/1552141854563369041
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (2 messages)
[2026-09-23T02:17:35.529Z] containerd | crow: If the server has been up for long enough, agent generations will make the entire server unresponsive for minutes at a time.

This is a different issue from https://discord.com/channels/1417099416812392641/1550967268391780402, which doesn't make the entire server unresponsive. With this issue, even `GET /api/health` will fail to respond until the agent generation is complete.

I don't think this is related to Termux/Android because this can be observed when Termux is in the foreground and the phone is awake the entire time.

I had Claude (Fable) diagnose and attempt a fix. I'm currently running Claude's fix on my fork; will see how it goes.
- Claude's Bug report: https://github.com/luma-inibitor/st-notes/blob/issue-6388-repro/marinara/issue-store-join.md
- Patch branch: https://github.com/luma-inibitor/Marinara-Engine/tree/patch/store-hash-join
- Fix commit: https://github.com/luma-inibitor/Marinara-Engine/commit/c8623720f

Marinara Engine diagnostics
Version: 2.4.6
Build: 2.4.6+42d50ab690ad
Commit: 42d50ab690ad
Fork: luma-inibitor/Marinara-Engine @ luma/main (32 commits ahead of ea87e7e722cc6c23acf251a9dceec318b04870cb)
Upstream version: 2.4.6
Upstream build: 2.4.6+ea87e7e722cc
Upstream commit: ea87e7e722cc
Server OS: Android / Termux 6.6.118-android15-8-g1831c2a45d9b-ab15739706-4k (arm64)
Server memory: heap 136.9 / 3424 MiB; RSS 250.7 MiB
Background wake lock: acquired
Last detected freeze: none detected
Previous session: shut down cleanly at 2026-09-23T02:04:56.723Z
Sessions ended without shutdown: 5 recorded
Client OS: macOS 10
Browser / app shell: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:155.0) Gecko/20100101 Firefox/155.0
Client runtime: {"build":"2.4.6+42d50ab690ad","page":"mudgzlak-13h2874k","persistence":"local","navigation":"navigate","standalone":false,"view":[1246,0,0,0],"events":[{"at":1790126588535,"page":"mubv5ky9-yrpxj2nz","build":"2.4.6+28ac0dfa7c1b","kind":"reload-requested","reason":"chunk-recovery","view":[1246,0,0,0]},{"at":1790127009073,"page":"mudfegc1-lx4pc0jo","build":"2.4.6+28ac0dfa7c1b","kind":"page-start","view":[1246,0,0,0]},{"at":1790127589451,"page":"mudfegc1-lx4pc0jo","build":"2.4.6+28ac0dfa7c1b","kind":"message-edited","view":[1246,0,0,0]},{"at":1790129674402,"page":"mudfegc1-lx4pc0jo","build":"2.4.6+28ac0dfa7c1b","kind":"reload-requested","reason":"version-update","view":[1246,0,0,0]},{"at":1790129674892,"page":"mudgzlak-13h2874k","build":"2.4.6+42d50ab690ad","kind":"page-start","view":[1246,0,0,0]}]}
GPU: Apple M1, or similar
Active connection: [or] ds v4
Connection provider: openrouter
LLM model: deepseek/deepseek-v4-pro
Mari last acted on: none recorded this session
[Discord message: https://discord.com/channels/1417099416812392641/1552141854563369041/1552141854563369041]

[2026-09-23T02:17:36.104Z] Professor Mari [bot]: Howdy!

Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.**

**Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab:

`Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.`

If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here:

`Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version`

Thank you, this will help tremendously.

This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case.

Cheers!
[Discord message: https://discord.com/channels/1417099416812392641/1552141854563369041/1552141856974835723]

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 (Sep 23, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6562 Originally assigned to: @SpicyMarinara on GitHub. ## Summary After the server has been running long enough and many chats are loaded, agent generations can make the entire server unresponsive for minutes. Even `GET /api/health` fails to respond until generation completes. ## Expected behavior Agent generation should not block the server; health checks and other requests should remain responsive. ## Actual behavior During agent generation, the entire server becomes unresponsive for minutes, including requests to `GET /api/health`. ## Steps to reproduce 1. Leave the server running long enough and load many chats. 2. Trigger an agent generation. 3. While generation is running, request `GET /api/health` and observe whether it responds. ## Environment - Marinara Engine version: 2.4.6 (build 2.4.6+42d50ab690ad; commit 42d50ab690ad; fork 32 commits ahead of upstream) - Install type: termux - OS + version: Android / Termux 6.6.118-android15-8-g1831c2a45d9b-ab15739706-4k (arm64) - Browser or app shell: Mozilla Firefox 155.0 on macOS 10 ## Logs, screenshots, or video No logs, screenshots, or video provided. Support diagnostics report no detected freeze and a clean previous shutdown. ## Additional context Reporter says this is distinct from another issue that does not make the entire server unresponsive. They do not believe it is specific to Termux/Android: the issue was observed with Termux in the foreground and the phone awake. A proposed fix is being tested on the reporter's fork: https://github.com/luma-inibitor/Marinara-Engine/tree/patch/store-hash-join (commit https://github.com/luma-inibitor/Marinara-Engine/commit/c8623720f). Related diagnostic report: https://github.com/luma-inibitor/st-notes/blob/issue-6388-repro/marinara/issue-store-join.md. Connection provider: OpenRouter; model: deepseek/deepseek-v4-pro. Discord thread: A tracker agent query blocks the server for minutes once many chats are loaded Discord thread link: https://discord.com/channels/1417099416812392641/1552141854563369041 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (2 messages)</summary> ```text [2026-09-23T02:17:35.529Z] containerd | crow: If the server has been up for long enough, agent generations will make the entire server unresponsive for minutes at a time. This is a different issue from https://discord.com/channels/1417099416812392641/1550967268391780402, which doesn't make the entire server unresponsive. With this issue, even `GET /api/health` will fail to respond until the agent generation is complete. I don't think this is related to Termux/Android because this can be observed when Termux is in the foreground and the phone is awake the entire time. I had Claude (Fable) diagnose and attempt a fix. I'm currently running Claude's fix on my fork; will see how it goes. - Claude's Bug report: https://github.com/luma-inibitor/st-notes/blob/issue-6388-repro/marinara/issue-store-join.md - Patch branch: https://github.com/luma-inibitor/Marinara-Engine/tree/patch/store-hash-join - Fix commit: https://github.com/luma-inibitor/Marinara-Engine/commit/c8623720f Marinara Engine diagnostics Version: 2.4.6 Build: 2.4.6+42d50ab690ad Commit: 42d50ab690ad Fork: luma-inibitor/Marinara-Engine @ luma/main (32 commits ahead of ea87e7e722cc6c23acf251a9dceec318b04870cb) Upstream version: 2.4.6 Upstream build: 2.4.6+ea87e7e722cc Upstream commit: ea87e7e722cc Server OS: Android / Termux 6.6.118-android15-8-g1831c2a45d9b-ab15739706-4k (arm64) Server memory: heap 136.9 / 3424 MiB; RSS 250.7 MiB Background wake lock: acquired Last detected freeze: none detected Previous session: shut down cleanly at 2026-09-23T02:04:56.723Z Sessions ended without shutdown: 5 recorded Client OS: macOS 10 Browser / app shell: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:155.0) Gecko/20100101 Firefox/155.0 Client runtime: {"build":"2.4.6+42d50ab690ad","page":"mudgzlak-13h2874k","persistence":"local","navigation":"navigate","standalone":false,"view":[1246,0,0,0],"events":[{"at":1790126588535,"page":"mubv5ky9-yrpxj2nz","build":"2.4.6+28ac0dfa7c1b","kind":"reload-requested","reason":"chunk-recovery","view":[1246,0,0,0]},{"at":1790127009073,"page":"mudfegc1-lx4pc0jo","build":"2.4.6+28ac0dfa7c1b","kind":"page-start","view":[1246,0,0,0]},{"at":1790127589451,"page":"mudfegc1-lx4pc0jo","build":"2.4.6+28ac0dfa7c1b","kind":"message-edited","view":[1246,0,0,0]},{"at":1790129674402,"page":"mudfegc1-lx4pc0jo","build":"2.4.6+28ac0dfa7c1b","kind":"reload-requested","reason":"version-update","view":[1246,0,0,0]},{"at":1790129674892,"page":"mudgzlak-13h2874k","build":"2.4.6+42d50ab690ad","kind":"page-start","view":[1246,0,0,0]}]} GPU: Apple M1, or similar Active connection: [or] ds v4 Connection provider: openrouter LLM model: deepseek/deepseek-v4-pro Mari last acted on: none recorded this session [Discord message: https://discord.com/channels/1417099416812392641/1552141854563369041/1552141854563369041] [2026-09-23T02:17:36.104Z] Professor Mari [bot]: Howdy! Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.** **Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab: `Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.` If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here: `Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version` Thank you, this will help tremendously. This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case. Cheers! [Discord message: https://discord.com/channels/1417099416812392641/1552141854563369041/1552141856974835723] ``` </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 06:05:48 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Sep 23, 2026):

SpicyMarinara / Codex is taking this fix. I traced the reported getPreviousOutput query to the same nested join in current staging. I am reviewing and adapting @luma-inibitor's proposed lookup-based join, with regression coverage for result ordering, filtering, and many loaded chats. The PR will target staging.

<!-- gh-comment-id:5791384346 --> @SpicyMarinara commented on GitHub (Sep 23, 2026): SpicyMarinara / Codex is taking this fix. I traced the reported `getPreviousOutput` query to the same nested join in current staging. I am reviewing and adapting @luma-inibitor's proposed lookup-based join, with regression coverage for result ordering, filtering, and many loaded chats. The PR will target staging.
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#3677
No description provided.