Skip to content

Commit 2b4c8b8

Browse files
committed
Document the websocket heartbeat interval and the Redis response stream lifetime
WEBSOCKET_HEARTBEAT_INTERVAL sets how often a connected browser reports that it is still there. The value is served to the browser, so changing it takes effect without a rebuild, and it also decides how long the server holds a presence entry before assuming the client has gone. Raising it cuts the number of small websocket messages a large deployment handles, at the cost of a disconnected user showing as active for longer. REDIS_RESPONSE_STREAM_TTL gives each stored response an expiry, so the store no longer grows with every reply. The default keeps an hour, which covers a browser reconnecting and resuming a reply, and zero restores the previous behaviour of keeping entries indefinitely.
1 parent dbc37f8 commit 2b4c8b8

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

docs/reference/env-configuration.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7979,6 +7979,13 @@ Redis Cluster mode is fully compatible with OpenTelemetry instrumentation. When
79797979
- Default: `open-webui`
79807980
- Description: Customizes the Redis key prefix used for storing configuration values. This allows multiple Open WebUI instances to share the same Redis instance without key conflicts. When operating in Redis cluster mode, the prefix is formatted as `{prefix}:` (e.g., `{open-webui}:config:*`) to enable multi-key operations on configuration keys within the same hash slot.
79817981

7982+
#### `REDIS_RESPONSE_STREAM_TTL`
7983+
7984+
- Type: `int` (seconds)
7985+
- Default: `3600`
7986+
- Description: How long a finished response is kept in Redis so a reconnecting browser can pick a reply back up where it left off. Each entry expires on its own after this many seconds, so the store no longer grows with every reply on a busy instance. Raise it if users routinely return to a tab hours later and expect the streamed reply still to be there, lower it to reclaim memory sooner, or set `0` to keep entries indefinitely as before. Applies only when Redis is in use.
7987+
- Persistence: No
7988+
79827989
#### `REDIS_SOCKET_CONNECT_TIMEOUT`
79837990

79847991
- Type: `float` (seconds) or empty string for None
@@ -8219,6 +8226,12 @@ When this variable is left empty (default), `REDIS_SOCKET_CONNECT_TIMEOUT` is au
82198226
- Default: `25`
82208227
- Description: The interval in seconds at which the Socket.IO/Engine.IO server sends heartbeat pings to connected websocket clients.
82218228

8229+
#### `WEBSOCKET_HEARTBEAT_INTERVAL`
8230+
8231+
- Type: `int` (seconds)
8232+
- Default: unset, meaning the browser sends a heartbeat every 30 seconds and presence entries are held for 120 seconds
8233+
- Description: How often each connected browser tells the server it is still there. The value is served to the browser, so setting it changes the client's behaviour without a rebuild, and it also lengthens how long the server keeps a presence entry before assuming the client is gone, to four times this interval or 120 seconds, whichever is larger. Raise it to cut the number of small websocket messages a large deployment handles, at the cost of a disconnected user showing as active for longer. Values are held between `5` and `90`, and anything that is not a whole number falls back to `30`.
8234+
82228235
#### `WEBSOCKET_EVENT_CALLER_TIMEOUT`
82238236

82248237
- Type: `int`

0 commit comments

Comments
 (0)