[GH-ISSUE #7165] [Issue]: Game Generation Fails with "NetworkError when attempting to fetch resource" #4000

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

Originally created by @S-Bryce on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7165

Originally assigned to: @SpicyMarinara on GitHub.

Summary

When attempting to generate a new game, the connection between Marinara Engine and the provider (Koboldcpp in this case) is interrupted without allowing the generation to complete. Based on #7162 since I cannot reopen issues, and the issue has persisted with the recent upgrade from 2.4.6 to 2.5.0.

Expected behavior

The game should have generated (or at least made it to the next step of generation)

Actual behavior

The connection is being terminated (although I cannot tell which side is terminating it, I do not have this issue with other tools/platforms/frontends using Koboldcpp). This appears to happen about 50 seconds into the generation, with Marinara receiving part of the generated JSON and then attempting to retry before failing in the same manner.

I have also noticed the error message "Game setup cancelled because the client disconnected", although I am just sitting on the page for the entire time.

Steps to reproduce

  1. Fill out the game generation wizard
  2. Press "Start Game"
  3. Wait for the generation attempts to fail
  4. Receive the error message

Environment

  • Marinara Engine version: 2.5.0
  • Install type: docker
  • OS + version: Ubuntu 22.04 LTS
  • Browser or app shell: Browser

Logs, screenshots, or video

Logs from Marinara Engine:
Image

Image

Logs from Koboldcpp:
Image

Additional context

Marinara Engine and Koboldcpp are located on the same physical machine, but as you'll probably glean from the logs, the connection to koboldcpp goes through "https://kobold.home", which is an internal domain I have set up for the machine's IP. This causes it to go through a TLS connection that traverses a HAProxy reverse proxy, with the TLS connection itself being terminated by Koboldcpp, as it natively supports TLS (rather than HAProxy terminating the TLS connection and forwarding the traffic in plaintext to the backend service, like is done for Marinara's web GUI).

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 @S-Bryce on GitHub (Oct 6, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7165 Originally assigned to: @SpicyMarinara on GitHub. ## Summary When attempting to generate a new game, the connection between Marinara Engine and the provider (Koboldcpp in this case) is interrupted without allowing the generation to complete. Based on #7162 since I cannot reopen issues, and the issue has persisted with the recent upgrade from 2.4.6 to 2.5.0. ## Expected behavior The game should have generated (or at least made it to the next step of generation) ## Actual behavior The connection is being terminated (although I cannot tell which side is terminating it, I do not have this issue with other tools/platforms/frontends using Koboldcpp). This appears to happen about 50 seconds into the generation, with Marinara receiving part of the generated JSON and then attempting to retry before failing in the same manner. I have also noticed the error message "Game setup cancelled because the client disconnected", although I am just sitting on the page for the entire time. ## Steps to reproduce 1. Fill out the game generation wizard 2. Press "Start Game" 3. Wait for the generation attempts to fail 4. Receive the error message ## Environment - Marinara Engine version: 2.5.0 - Install type: docker - OS + version: Ubuntu 22.04 LTS - Browser or app shell: Browser ## Logs, screenshots, or video Logs from Marinara Engine: <img width="2547" height="168" alt="Image" src="https://github.com/user-attachments/assets/d846c95e-29bb-4823-8288-150a150ec938" /> <img width="2158" height="171" alt="Image" src="https://github.com/user-attachments/assets/b312b69a-778c-497f-a622-3336e8260326" /> Logs from Koboldcpp: <img width="1084" height="108" alt="Image" src="https://github.com/user-attachments/assets/d60dc169-86fc-41ca-9771-82140b41beaa" /> ## Additional context Marinara Engine and Koboldcpp are located on the same physical machine, but as you'll probably glean from the logs, the connection to koboldcpp goes through "https://kobold.home", which is an internal domain I have set up for the machine's IP. This causes it to go through a TLS connection that traverses a HAProxy reverse proxy, with the TLS connection itself being terminated by Koboldcpp, as it natively supports TLS (rather than HAProxy terminating the TLS connection and forwarding the traffic in plaintext to the backend service, like is done for Marinara's web GUI). ## 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:09:26 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@SpicyMarinara commented on GitHub (Oct 6, 2026):

Thanks for the detailed report, the logs make this clear.

The ~50 second cut-off matches HAProxy's default timeout client 50s / timeout server 50s. Starting a game is one long request that only answers once the whole game is generated, so with a slower local model HAProxy sees 50 seconds of silence and closes the connection between your browser and Marinara. Marinara then sees the browser disconnect and cancels the Koboldcpp generation (that's the "Game setup cancelled because the client disconnected" message), and Firefox shows "NetworkError when attempting to fetch resource". The Marinara→Koboldcpp connection itself is fine.

Raising the timeouts for the Marinara frontend/backend in HAProxy should fix it, for example:

    timeout client 10m
    timeout server 10m

(or timeout tunnel 10m if you prefer), then reload HAProxy. Please let us know if it still fails after that.

<!-- gh-comment-id:6022159185 --> @SpicyMarinara commented on GitHub (Oct 6, 2026): Thanks for the detailed report, the logs make this clear. The ~50 second cut-off matches HAProxy's default `timeout client 50s` / `timeout server 50s`. Starting a game is one long request that only answers once the whole game is generated, so with a slower local model HAProxy sees 50 seconds of silence and closes the connection between your browser and Marinara. Marinara then sees the browser disconnect and cancels the Koboldcpp generation (that's the "Game setup cancelled because the client disconnected" message), and Firefox shows "NetworkError when attempting to fetch resource". The Marinara→Koboldcpp connection itself is fine. Raising the timeouts for the Marinara frontend/backend in HAProxy should fix it, for example: ``` timeout client 10m timeout server 10m ``` (or `timeout tunnel 10m` if you prefer), then reload HAProxy. Please let us know if it still fails after that.
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#4000
No description provided.