Tell clients when the gateway is full; default limit 60

A browser can't see why a WebSocket upgrade was refused, so a full gateway
now accepts, sends a gateway_full error and closes. The client shows a
translated hint that includes self-hosting. Default MAX_CONNECTIONS drops
from 300 to 60 after measuring ~8-9 % of a core per listening client.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
MoepchiandClaude Opus 5.5 committed 2026-10-25 20:45:15 +00:00
1 parent 999262b6df
commit e02a41d855
8 files changed
+17 -6

No files matched your search

+1 -1
View File
@@ -10256,7 +10256,7 @@ function AppInner() {
appendLog({ text: data.message, kind: "error" });
} else {
setConnecting(false);
setConnectError(data.message);
setConnectError(data.code === "gateway_full" ? t("connectError.gatewayFull") : data.message);
updateTabMeta(sessionId, { connecting: false, connected: false });
}
break;