mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[GH-ISSUE #23268] Background tasks silently skipped when Socket.IO disconnected #35465
Reference in New Issue
Block a user
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 @ataraxiaone on GitHub (Mar 31, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23268
Description
When the Socket.IO connection is not established (e.g., stale auth state after upgrade, network blip, or browser reconnection failure), the streaming response handler in
middleware.pytakes the fallback path which silently skips all background tasks — title generation, follow-up suggestions, and tag generation.No error is logged. No warning is emitted. The chat response streams normally via SSE, but the title stays "New Chat" forever.
Steps to Reproduce
Root Cause
streaming_chat_response_handlerinbackend/open_webui/utils/middleware.pybranches onevent_emitter and event_caller:event_emitterrequiressession_id(from Socket.IO$socket?.id). If Socket.IO isn't connected,session_idis null,event_emitteris None, and the fallback path is taken.The fallback path has no logging indicating that background tasks were skipped. From the user's perspective, everything works except titles/follow-ups/tags silently stop.
Expected Behavior
Environment
/ws/socket.io/(rejects polling: "Invalid transport")Impact
This is a silent production failure. All background task features (title generation, follow-up suggestions, tag generation) stop working with no indication to admins or users. The only symptom is "New Chat" titles, which is easily mistaken for a config issue.
@pr-validator-bot commented on GitHub (Mar 31, 2026):
⚠️ Missing Issue Title Prefix
@ataraxiaone, your issue title is missing a prefix (e.g.,
bug:,feat:,docs:).Please update your issue title to include one of the following prefixes:
Example:
bug: Login fails when using special characters in password@tjbck commented on GitHub (Apr 1, 2026):
Version upgrades force a refresh so this should not have happened in the first place. With that being said, event_emitter no longer depend on Socket.IO connectivity (session_id) at all in dev.