From 5c243dcf51e9b3611c45f1b3836fd5e72a658a63 Mon Sep 17 00:00:00 2001 From: silentoplayz Date: Fri, 18 Sep 2026 13:41:38 -0400 Subject: [PATCH] docs: correct the Redis and Valkey pages' key, prefix, Sentinel and log-level claims against the code --- docs/tutorials/integrations/redis.md | 13 +++++++------ docs/tutorials/integrations/valkey.md | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/tutorials/integrations/redis.md b/docs/tutorials/integrations/redis.md index 4a4763e36b..df8bb9f418 100644 --- a/docs/tutorials/integrations/redis.md +++ b/docs/tutorials/integrations/redis.md @@ -65,7 +65,7 @@ Without Redis in multi-worker or multi-instance scenarios, you will experience: ### Prerequisites -- A valid Open WebUI instance (running version 1.0 or higher) +- A current Open WebUI release - A Redis container (we will use `redis:7-alpine` in this example) - Docker Composer (version 2.0 or higher) installed on your system - A Docker network for communication between Open WebUI and Redis @@ -316,7 +316,7 @@ You can also provide a semicolon-separated list of allowed domains. **Do not ski Notice the different database numbers (`/0` vs `/1`) in the URLs: - `REDIS_URL` uses database `0` for general application state -- `WEBSOCKET_REDIS_URL` uses database `1` for websocket-specific data +- `WEBSOCKET_REDIS_URL` uses database `1` for websocket-specific data (when unset it defaults to `REDIS_URL`, and `WEBSOCKET_REDIS_CLUSTER` defaults to `REDIS_CLUSTER`) This separation helps isolate different types of data. You can use the same database number for both if preferred, but using separate databases is recommended for better organization and potential performance optimization. @@ -328,10 +328,12 @@ This separation helps isolate different types of data. You can use the same data REDIS_KEY_PREFIX="open-webui" ``` -The `REDIS_KEY_PREFIX` allows multiple Open WebUI instances to share the same Redis instance without key conflicts. 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. +The `REDIS_KEY_PREFIX` allows multiple Open WebUI instances to share the same Redis instance without key conflicts. `open-webui` is already the default, so this line only matters when you change it, and the prefix is used verbatim in cluster mode too. ### Sentinel Failover Configuration +Sentinel is enabled by setting `REDIS_SENTINEL_HOSTS` (comma-separated) and optionally `REDIS_SENTINEL_PORT` (default `26379`); `WEBSOCKET_SENTINEL_HOSTS` and `WEBSOCKET_SENTINEL_PORT` do the same for the websocket manager. In that mode the hostname part of `REDIS_URL` is the Sentinel master (service) name, and its database and credentials are reused. + :::danger Critical: Socket Timeout for Sentinel Deployments Redis Sentinel setups require explicit socket connection timeout configuration to ensure proper failover behavior. Without a timeout, the application can hang indefinitely when a Redis master node goes offline, potentially preventing even application restarts. @@ -408,7 +410,6 @@ REDIS_CLUSTER="true" - `REDIS_CLUSTER` enables cluster-aware connection handling - The `REDIS_URL` should point to your cluster's configuration endpoint - This option has no effect if `REDIS_SENTINEL_HOSTS` is defined (Sentinel takes precedence) -- When using cluster mode, the `REDIS_KEY_PREFIX` is automatically formatted as `{prefix}:` to ensure multi-key operations target the same hash slot ::: @@ -595,7 +596,7 @@ You can also verify that Open WebUI is actually writing data to Redis: docker exec -it redis redis-cli --scan --pattern "open-webui*" ``` -If Redis is configured correctly, you should see keys with your configured prefix (e.g., `open-webui:session:*`, `open-webui:config:*`). +If Redis is configured correctly, you should see keys with your configured prefix (e.g., `open-webui:session_pool`, `open-webui:usage_pool`, `open-webui:auth:token:*:revoked`). Persisted configuration is shared through the database `config` table, not Redis. ### Test Multi-Worker Setup @@ -658,7 +659,7 @@ REDIS_URL="redis://redis:6379/0" - `ENABLE_WEBSOCKET_SUPPORT="true"` - `WEBSOCKET_MANAGER="redis"` - `WEBSOCKET_REDIS_URL="redis://redis:6379/1"` -2. Check logs for: `DEBUG:open_webui.socket.main:Using Redis to manage websockets.` +2. Check logs for: `DEBUG:open_webui.socket.main:Using Redis to manage websockets.` (logged at DEBUG level, so it appears only with `GLOBAL_LOG_LEVEL=DEBUG`) 3. Verify Redis is accessible from Open WebUI container #### Issue: "Multiple Open WebUI instances interfering with each other" diff --git a/docs/tutorials/integrations/valkey.md b/docs/tutorials/integrations/valkey.md index 46c49c7554..eb822243d7 100644 --- a/docs/tutorials/integrations/valkey.md +++ b/docs/tutorials/integrations/valkey.md @@ -39,7 +39,7 @@ services: container_name: valkey volumes: - valkey-data:/data - command: "valkey-server --save 30 1 --maxclients 10000 --timeout 1800" + command: "valkey-server --save 30 1 --appendonly yes --maxmemory-policy noeviction --maxclients 10000 --timeout 1800" healthcheck: test: "[ $$(valkey-cli ping) = 'PONG' ]" start_period: 5s