open-webui/backend/open_webui/routers
Classic298 3fc866117d
fix(db): CRITICAL - prevent pool exhaustion in memory /reset (#20580)
Remove Depends(get_session) from POST /reset to prevent catastrophic connection pool exhaustion.

This endpoint was holding a SINGLE database connection while executing N PARALLEL embedding API calls via asyncio.gather(). For a user with 100 memories, this meant one connection blocked for potentially MINUTES (100 calls * 1-5 seconds each, even in parallel due to rate limits).

A single user triggering /reset could completely starve the connection pool, causing QueuePool timeout errors across the entire application.

The Memories.get_memories_by_user_id() function now manages its own short-lived session, releasing the connection immediately before the massive parallel embedding operation begins.
2026-01-11 23:32:40 +04:00
..
audio.py fix: correct empty STT_ENGINE handling and improve TTS error response (#20534) 2026-01-10 15:32:22 +04:00
auths.py refac 2026-01-09 18:51:38 +04:00
channels.py Update channels.py (#20546) 2026-01-10 15:34:12 +04:00
chats.py chore: format 2026-01-08 01:55:56 +04:00
configs.py refac 2026-01-08 00:53:21 +04:00
evaluations.py chore: format 2026-01-09 20:44:31 +04:00
files.py fix(files): prevent connection pool exhaustion in file status streaming (#20547) 2026-01-10 15:23:48 +04:00
folders.py refac/enh: db session sharing 2025-12-29 00:21:18 +04:00
functions.py refac 2026-01-08 00:53:21 +04:00
groups.py refac: group share to settings 2026-01-05 05:32:56 +04:00
images.py feat: enforce permissions in backend (#20471) 2026-01-08 02:48:35 +04:00
knowledge.py enh: kb metadata search 2026-01-09 22:21:00 +04:00
memories.py fix(db): CRITICAL - prevent pool exhaustion in memory /reset (#20580) 2026-01-11 23:32:40 +04:00
models.py feat: Models Atomic PR of #20243 (#20369) 2026-01-05 23:37:41 +04:00
notes.py fix(notes): eliminate N+1 query in get_notes endpoint 2026-01-07 23:32:56 +04:00
ollama.py fix: native function calling system prompt duplication 2026-01-08 23:08:47 +04:00
openai.py fix: native function calling system prompt duplication 2026-01-08 23:08:47 +04:00
pipelines.py chore/perf: Remove old SRC level log env vars with no impact (#20045) 2025-12-20 08:16:14 -05:00
prompts.py chore: format 2026-01-08 01:55:56 +04:00
retrieval.py feat: enforce permissions in backend (#20471) 2026-01-08 02:48:35 +04:00
scim.py refac 2025-12-29 01:20:04 +04:00
tasks.py chore/perf: Remove old SRC level log env vars with no impact (#20045) 2025-12-20 08:16:14 -05:00
tools.py refac 2026-01-08 00:53:21 +04:00
users.py chore: format 2026-01-09 02:46:04 +04:00
utils.py chore/perf: Remove old SRC level log env vars with no impact (#20045) 2025-12-20 08:16:14 -05:00