Make the send buffer limit a config and start a new session on overflow

Add controller.max_send_buffer_size in MiB, default 64 and 0 for no
limit. Close with 1013 instead of 1008 on overflow: clients treat 1008
as fatal, so a host would shut down and the web UI would log out. With
1013 the client resumes, the controller answers with invalidate since
the session has ended, and the client registers a new session.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 5.5 committed 2026-10-08 15:18:02 +00:00
1 parent 235a15b9cc
commit ad4595a257
7 files changed
+59 -11

No files matched your search

+9
View File
@@ -25,6 +25,7 @@ export interface ControllerConfigFields {
"controller.auth_secret": string | null;
"controller.heartbeat_interval": number;
"controller.session_timeout": number;
"controller.max_send_buffer_size": number;
"controller.metrics_timeout": number;
"controller.system_metrics_interval": number;
"controller.proxy_stream_timeout": number;
@@ -201,6 +202,14 @@ export class ControllerConfig extends classes.Config<ControllerConfigFields> {
initialValue: 60,
validator: validators.greaterThanZero,
},
"controller.max_send_buffer_size": {
title: "Max Send Buffer Size",
description:
"MiB of unacknowledged messages to keep for a connection before ending its session, 0 for no limit.",
type: "number",
initialValue: 64,
validator: validators.greaterThanEqualZero,
},
"controller.metrics_timeout": {
title: "Metrics Timeout",
description: "Timeout in seconds for metrics gathering from hosts.",