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;
+1
View File
@@ -709,6 +709,7 @@
"serverContext.addFavorite": "Přidat do oblíbených",
"serverContext.disconnect": "Odpojit",
"connectError.dismiss": "Zavřít",
"connectError.gatewayFull": "Brána je právě plná. Zkus to za pár minut znovu – nebo si WebSpeak3 hostuj sám: github.com/WebSpeak3/webspeak3",
"dialog.close": "Zavřít",
"sounds.title": "Zvuky",
"sounds.subtitle": "Nastavit zvuková upozornění na události",
+1
View File
@@ -709,6 +709,7 @@
"serverContext.addFavorite": "Zu Favoriten hinzufügen",
"serverContext.disconnect": "Verbindung trennen",
"connectError.dismiss": "Schließen",
"connectError.gatewayFull": "Das Gateway ist gerade voll. Versuch es in ein paar Minuten nochmal – oder hoste WebSpeak3 selbst: github.com/WebSpeak3/webspeak3",
"dialog.close": "Schließen",
"sounds.title": "Sounds",
"sounds.subtitle": "Sound-Benachrichtigungen für Ereignisse festlegen",
+1
View File
@@ -709,6 +709,7 @@
"serverContext.addFavorite": "Add to favorites",
"serverContext.disconnect": "Disconnect",
"connectError.dismiss": "Dismiss",
"connectError.gatewayFull": "The gateway is full right now. Try again in a few minutes – or host WebSpeak3 yourself: github.com/WebSpeak3/webspeak3",
"dialog.close": "Close",
"sounds.title": "Sounds",
"sounds.subtitle": "Configure sound notifications for events",
+1
View File
@@ -708,6 +708,7 @@
"serverContext.addFavorite": "افزودن به نشانک‌ها",
"serverContext.disconnect": "قطع اتصال",
"connectError.dismiss": "رد کردن",
"connectError.gatewayFull": "گیت‌وی در حال حاضر پر است. چند دقیقه دیگر دوباره امتحان کنید – یا WebSpeak3 را خودتان میزبانی کنید: github.com/WebSpeak3/webspeak3",
"dialog.close": "بستن",
"sounds.title": "صداها",
"sounds.subtitle": "پیکربندی اعلان‌های صوتی برای رویدادها",
+1
View File
@@ -554,6 +554,7 @@
"serverContext.addFavorite": "添加到收藏夹",
"serverContext.disconnect": "断开连接",
"connectError.dismiss": "关闭",
"connectError.gatewayFull": "网关当前已满。请几分钟后再试,或自行部署 WebSpeak3:github.com/WebSpeak3/webspeak3",
"dialog.close": "关闭",
"sounds.title": "声音",
"sounds.subtitle": "配置事件提示音",