[GH-ISSUE #5347] [Issue]: SwarmUI connections time out during long image generation #2957

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

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

Originally assigned to: @SpicyMarinara on GitHub.

Summary

SwarmUI connections in Marinara Engine 2.4.4 still time out prematurely while image generation is ongoing. The timeout occurs after approximately 20–40 seconds, although generation takes approximately 60–120 seconds.

Expected behavior

The SwarmUI connection should remain active until generation completes and return the generated image successfully.

Actual behavior

The connection times out after approximately 20–40 seconds while generation is still in progress. The reported logs show fetch failures with read ETIMEDOUT, and image generation fails.

Steps to reproduce

  1. Use a SwarmUI connection with Marinara Engine.
  2. Start an image generation involving image references or a resolution that causes generation to take approximately 60–120 seconds.
  3. Observe that the connection times out after approximately 20–40 seconds before generation completes.

Environment

  • Marinara Engine version: 2.4.4 (build 2.4.4+9a810f64edb1, commit 9a810f64ed)
  • Install type: Not provided
  • OS + version: Linux 6.8.0-137-generic (x64)
  • Browser or app shell: Not provided

Logs, screenshots, or video

Attached image: https://cdn.discordapp.com/attachments/1540136011588173874/1540136011806408734/image.png?ex=6a88daef&is=6a87896f&hm=13a3b5583e77f930d8ddfefebef158b21c05af6a3b2d2a85cb7b7b41323d71cb&

Logs:
{"level":40,"time":1787269440544,"pid":9,"hostname":"c285ef71bc77","err":{"type":"TypeError","message":"fetch failed: read ETIMEDOUT","stack":"TypeError: fetch failed\ncaused by: Error: read ETIMEDOUT\n at TCP.onStreamRead (node:internal/stream_base_commons:216:20)"},"msg":"[retry-agents] Illustrator image variant 1 failed"}
{"level":50,"time":1787269440545,"pid":9,"hostname":"c285ef71bc77","err":{"type":"TypeError","message":"fetch failed: read ETIMEDOUT","stack":"TypeError: fetch failed\ncaused by: Error: read ETIMEDOUT\n at TCP.onStreamRead (node:internal/stream_base_commons:216:20)"},"msg":"[retry-agents] Illustrator image generation failed"}

Additional context

This is reported as a regression and a duplicate of a previous SwarmUI connection timeout bug. The report suspects that HTTP requests to /API/GenerateText2Image remain quiet during generation and time out, and suggests evaluating the websocket-based /API/GenerateText2ImageWS endpoint to provide continuous generation progress feedback.

Discord thread: [Bug]: SwarmUI Connection Timeouts
Discord thread link: https://discord.com/channels/1417099416812392641/1540136011588173874
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (2 messages)
[2026-08-20T23:10:39.506Z] m;aemoifmpfmmafe: Hi, This is a duplicate of the previous bug report for the SwarmUI connections on the previous version.
The regression bug still exists at the current version.
It still timeout prematurely around 20s - 40s while the generation is still ongoing (Total generation time is actually around 60s - 120s depending resolution and image references attached)

I did a quick check around staging github with gemini/claude. 
They seem to point to the timeouts originating from HTTP request from /API/GenerateText2Image as the session is completely quiet until the generations are done. 
They seem to suggest a migration to /API/GenerateText2ImageWS websocket based connection instead as the constant generation progress feedback will stabilize the connection and prevent the timeouts.

Marinara Engine diagnostics
Version: 2.4.4
Build: 2.4.4+9a810f64edb1
Commit: 9a810f64edb1
Server OS: Linux 6.8.0-137-generic (x64)

[attached image 1: https://cdn.discordapp.com/attachments/1540136011588173874/1540136011806408734/image.png?ex=6a88daef&is=6a87896f&hm=13a3b5583e77f930d8ddfefebef158b21c05af6a3b2d2a85cb7b7b41323d71cb&]
[Discord message: https://discord.com/channels/1417099416812392641/1540136011588173874/1540136011588173874]

[2026-08-20T23:45:12.566Z] m;aemoifmpfmmafe: {"level":40,"time":1787269440544,"pid":9,"hostname":"c285ef71bc77","err":{"type":"TypeError","message":"fetch failed: read ETIMEDOUT","stack":"TypeError: fetch failed\ncaused by: Error: read ETIMEDOUT\n    at TCP.onStreamRead (node:internal/stream_base_commons:216:20)"},"msg":"[retry-agents] Illustrator image variant 1 failed"}
{"level":50,"time":1787269440545,"pid":9,"hostname":"c285ef71bc77","err":{"type":"TypeError","message":"fetch failed: read ETIMEDOUT","stack":"TypeError: fetch failed\ncaused by: Error: read ETIMEDOUT\n    at TCP.onStreamRead (node:internal/stream_base_commons:216:20)"},"msg":"[retry-agents] Illustrator image generation failed"}
[Discord message: https://discord.com/channels/1417099416812392641/1540136011588173874/1540144706632163429]

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 (Aug 21, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5347 Originally assigned to: @SpicyMarinara on GitHub. ## Summary SwarmUI connections in Marinara Engine 2.4.4 still time out prematurely while image generation is ongoing. The timeout occurs after approximately 20–40 seconds, although generation takes approximately 60–120 seconds. ## Expected behavior The SwarmUI connection should remain active until generation completes and return the generated image successfully. ## Actual behavior The connection times out after approximately 20–40 seconds while generation is still in progress. The reported logs show fetch failures with read ETIMEDOUT, and image generation fails. ## Steps to reproduce 1. Use a SwarmUI connection with Marinara Engine. 2. Start an image generation involving image references or a resolution that causes generation to take approximately 60–120 seconds. 3. Observe that the connection times out after approximately 20–40 seconds before generation completes. ## Environment - Marinara Engine version: 2.4.4 (build 2.4.4+9a810f64edb1, commit 9a810f64edb1) - Install type: Not provided - OS + version: Linux 6.8.0-137-generic (x64) - Browser or app shell: Not provided ## Logs, screenshots, or video Attached image: https://cdn.discordapp.com/attachments/1540136011588173874/1540136011806408734/image.png?ex=6a88daef&is=6a87896f&hm=13a3b5583e77f930d8ddfefebef158b21c05af6a3b2d2a85cb7b7b41323d71cb& Logs: {"level":40,"time":1787269440544,"pid":9,"hostname":"c285ef71bc77","err":{"type":"TypeError","message":"fetch failed: read ETIMEDOUT","stack":"TypeError: fetch failed\ncaused by: Error: read ETIMEDOUT\n at TCP.onStreamRead (node:internal/stream_base_commons:216:20)"},"msg":"[retry-agents] Illustrator image variant 1 failed"} {"level":50,"time":1787269440545,"pid":9,"hostname":"c285ef71bc77","err":{"type":"TypeError","message":"fetch failed: read ETIMEDOUT","stack":"TypeError: fetch failed\ncaused by: Error: read ETIMEDOUT\n at TCP.onStreamRead (node:internal/stream_base_commons:216:20)"},"msg":"[retry-agents] Illustrator image generation failed"} ## Additional context This is reported as a regression and a duplicate of a previous SwarmUI connection timeout bug. The report suspects that HTTP requests to /API/GenerateText2Image remain quiet during generation and time out, and suggests evaluating the websocket-based /API/GenerateText2ImageWS endpoint to provide continuous generation progress feedback. Discord thread: [Bug]: SwarmUI Connection Timeouts Discord thread link: https://discord.com/channels/1417099416812392641/1540136011588173874 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (2 messages)</summary> ```text [2026-08-20T23:10:39.506Z] m;aemoifmpfmmafe: Hi, This is a duplicate of the previous bug report for the SwarmUI connections on the previous version. The regression bug still exists at the current version. It still timeout prematurely around 20s - 40s while the generation is still ongoing (Total generation time is actually around 60s - 120s depending resolution and image references attached) I did a quick check around staging github with gemini/claude. They seem to point to the timeouts originating from HTTP request from /API/GenerateText2Image as the session is completely quiet until the generations are done. They seem to suggest a migration to /API/GenerateText2ImageWS websocket based connection instead as the constant generation progress feedback will stabilize the connection and prevent the timeouts. Marinara Engine diagnostics Version: 2.4.4 Build: 2.4.4+9a810f64edb1 Commit: 9a810f64edb1 Server OS: Linux 6.8.0-137-generic (x64) [attached image 1: https://cdn.discordapp.com/attachments/1540136011588173874/1540136011806408734/image.png?ex=6a88daef&is=6a87896f&hm=13a3b5583e77f930d8ddfefebef158b21c05af6a3b2d2a85cb7b7b41323d71cb&] [Discord message: https://discord.com/channels/1417099416812392641/1540136011588173874/1540136011588173874] [2026-08-20T23:45:12.566Z] m;aemoifmpfmmafe: {"level":40,"time":1787269440544,"pid":9,"hostname":"c285ef71bc77","err":{"type":"TypeError","message":"fetch failed: read ETIMEDOUT","stack":"TypeError: fetch failed\ncaused by: Error: read ETIMEDOUT\n at TCP.onStreamRead (node:internal/stream_base_commons:216:20)"},"msg":"[retry-agents] Illustrator image variant 1 failed"} {"level":50,"time":1787269440545,"pid":9,"hostname":"c285ef71bc77","err":{"type":"TypeError","message":"fetch failed: read ETIMEDOUT","stack":"TypeError: fetch failed\ncaused by: Error: read ETIMEDOUT\n at TCP.onStreamRead (node:internal/stream_base_commons:216:20)"},"msg":"[retry-agents] Illustrator image generation failed"} [Discord message: https://discord.com/channels/1417099416812392641/1540136011588173874/1540144706632163429] ``` </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:58:20 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Aug 21, 2026):

Resolved in #5350 and landed on staging.

<!-- gh-comment-id:5366684739 --> @SpicyMarinara commented on GitHub (Aug 21, 2026): Resolved in #5350 and landed on `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#2957
No description provided.