mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #20725] [CLOSED] Fix/socketio polling fallback #25748
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/20725
Author: @taimax13
Created: 1/16/2026
Status: ❌ Closed
Base:
dev← Head:fix/socketio-polling-fallback📝 Commits (10+)
fe6783cMerge pull request #19030 from open-webui/devfc05e0aMerge pull request #19405 from open-webui/deve3faec6Merge pull request #19416 from open-webui/dev9899293Merge pull request #19448 from open-webui/dev140605eMerge pull request #19462 from open-webui/dev6f1486fMerge pull request #19466 from open-webui/devd95f533Merge pull request #19729 from open-webui/deva7271530.6.43 (#20093)6adde20Merge pull request #20394 from open-webui/devf9b0534Merge pull request #20522 from open-webui/dev📊 Changes
3 files changed (+13 additions, -4 deletions)
View changed files
📝
backend/open_webui/env.py(+1 -1)📝
backend/open_webui/socket/main.py(+8 -2)📝
src/routes/+layout.svelte(+4 -1)📄 Description
Description
Improves resilience of realtime channel on networks where WebSockets are blocked/flaky by allowing Socket.IO polling fallback (while still upgrading to WebSocket when available).
Fixes env var wiring so WEBSOCKET_SERVER_ENGINEIO_LOGGING can be enabled independently from WEBSOCKET_SERVER_LOGGING.
Added
WEBSOCKET_SERVER_ENGINEIO_LOGGING env var works as intended (separate toggle).
Changed
Socket.IO server transport configuration allows polling fallback when websockets are enabled.
Frontend Socket.IO client is allowed to use polling when websocket upgrades fail.
Fixed
WEBSOCKET_SERVER_ENGINEIO_LOGGING previously read WEBSOCKET_SERVER_LOGGING by mistake.
Additional Information
Related discussion: (paste your Discussions link here once created)
Motivation: Some environments block WS but allow HTTPS; polling fallback keeps UI usable and avoids “stuck streaming” UX.
Note: This does not address DNS ERR_NAME_NOT_RESOLVED itself (client-side), but mitigates WS-specific failures where HTTP works.
Testing
Manual:
Run app normally and verify Socket.IO still upgrades to websocket when available.
Simulate websocket-blocked environment (e.g. block WS upgrade / force polling) and verify UI remains functional (connect succeeds via polling).
Optionally enable logging:
WEBSOCKET_SERVER_LOGGING=true
WEBSOCKET_SERVER_ENGINEIO_LOGGING=true
Confirm engine.io logs appear.
Agentic AI Code
Changelog Entry
Fixed
Allow Socket.IO polling fallback when WebSocket is unavailable.
Fix WEBSOCKET_SERVER_ENGINEIO_LOGGING env var parsing.
contributor license agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.