mirror of
https://github.com/open-webui/terminals.git
synced 2026-11-05 01:37:21 +00:00
[PR #44] [MERGED] Fix WebSocket connection counter leak and guard mid-retry re-resolves #60
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/terminals#60
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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/terminals/pull/44
Author: @Classic298
Created: 7/15/2026
Status: ✅ Merged
Merged: 7/19/2026
Merged by: @tjbck
Base:
main← Head:perf-followup-fixes📝 Commits (1)
82513c3Fix WebSocket connection counter leak and guard mid-retry re-resolves📊 Changes
2 files changed (+56 additions, -16 deletions)
View changed files
📝
README.md(+4 -0)📝
terminals/routers/proxy.py(+52 -16)📄 Description
Description
Follow-up to
c9be162(orchestrator performance work):active_ws_connectionsleaking on failed connection attempts. Thecounter is incremented on entry to
_ws_proxy_handlerbut was onlydecremented in the
finallyaround the relay loop, so every early return(instance resolve failure, connect-retry exhaustion) leaked a permanent +1 —
the stats counter grows monotonically whenever containers are unreachable.
The counter is now maintained by a try/finally around the whole handler body.
c9be162: ifprovisioning fails during a retry, the exception escaped as an unhandled
500 / raw ASGI error. Now returns the existing 502 (HTTP) or closes with
4003 (WebSocket).
TERMINALS_STATUS_CACHE_TTL,TERMINALS_TOKEN_CACHE_TTL,TERMINALS_WS_COMPRESSION,TERMINALS_ACCESS_LOG) in the README configuration table.Related Issues
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.