open-webui/backend/open_webui
Sihyeon Jang f59da361f1 feat: Re-use Redis connection pools via local cache to prevent transient exhaustion
Every call to get_redis_connection() spawned a new pool, so workers slowly accumulated thousands of open sockets. Even though connections were eventually released, skewed release timing still pushed us past Redis’ max-clients and the cluster egress IP cap.

A module-level _CONNECTION_CACHE now memoises pools by (redis_url, sentinel_hosts, async_mode, decode_responses).

Result: flat connection count, no more IP or FD exhaustion. Public API unchanged.

Signed-off-by: Sihyeon Jang <sihyeon.jang@navercorp.com>
2025-07-24 18:44:42 +09:00
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
internal refac 2025-06-21 19:12:43 +04:00
migrations feat: migrate folder table 2025-07-13 00:51:58 +04:00
models refac: memory handling 2025-07-20 15:00:24 +04:00
retrieval Merge pull request #15951 from 0xThresh/s3vector-support 2025-07-23 12:02:20 +04:00
routers Update audio.py Fix Format error 2025-07-23 08:49:00 +02:00
socket Merge pull request #15941 from taylorwilsdon/tasks_redis_key_prefix 2025-07-23 12:18:03 +04:00
static doc: changelog 2025-06-16 18:27:18 +04:00
storage Fix S3 allowed characters in Tags. 2025-05-23 11:09:40 +02:00
test chore: format, lint 2025-07-16 15:23:18 +09:00
utils feat: Re-use Redis connection pools via local cache to prevent transient exhaustion 2025-07-24 18:44:42 +09:00
__init__.py Update __init__.py 2025-04-15 09:55:35 +02:00
alembic.ini dev5 2024-09-04 17:33:39 +02:00
config.py merge main 2025-07-21 18:06:17 -06:00
constants.py feat: follow ups 2025-06-03 18:07:29 +04:00
env.py refactor: change MAX_RETRY_COUNT as env 2025-07-16 15:23:18 +09:00
functions.py refac: reserved __user__ param format 2025-06-04 15:53:07 +04:00
main.py refac 2025-07-22 11:38:47 +04:00
tasks.py implement redis_key_prefix env support in all areas invoking redis to allow for clustermode compatibility with new docs function 2025-07-22 13:40:29 -04:00