Files
open-webui-custom/backend/open_webui/routers
Classic298 826e9ab317 fix(db): release connection before embeddings in knowledge /metadata/reindex (#20577)
Remove Depends(get_session) from POST /metadata/reindex endpoint to prevent database connections from being held during N embedding API calls.

This endpoint is CRITICAL as it loops through ALL knowledge bases and calls embed_knowledge_base_metadata() for each one. With the original code, a single connection would be held for the entire duration (potentially minutes for large deployments), completely exhausting the pool.

The Knowledges.get_knowledge_bases() function manages its own short-lived session, releasing the connection before the embedding loop begins.
2026-01-11 23:33:04 +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-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