Files
open-webui-custom/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
..
2026-01-09 18:51:38 +04:00
2026-01-10 15:34:12 +04:00
2026-01-08 01:55:56 +04:00
2026-01-08 00:53:21 +04:00
2026-01-09 20:44:31 +04:00
2025-12-29 00:21:18 +04:00
2026-01-08 00:53:21 +04:00
2026-01-05 05:32:56 +04:00
2026-01-09 22:21:00 +04:00
2026-01-08 01:55:56 +04:00
2025-12-29 01:20:04 +04:00
2026-01-08 00:53:21 +04:00
2026-01-09 02:46:04 +04:00