open-webui/backend
Classic298 24044b42ea
fix(db): release connection before LLM call in Ollama /v1/chat/completions (#20569)
Remove Depends(get_session) from the /v1/chat/completions endpoint to prevent database connections from being held during the entire duration of LLM calls.

Previously, the database session was acquired at request start and held until the streaming response completed. Under concurrent load, this exhausted the connection pool, causing QueuePool timeout errors.

The fix allows Models.get_model_by_id() and has_access() to manage their own short-lived sessions internally, releasing the connection immediately after authorization checks complete.
2026-01-11 23:35:38 +04:00
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
open_webui fix(db): release connection before LLM call in Ollama /v1/chat/completions (#20569) 2026-01-11 23:35:38 +04:00
.dockerignore fix: litellm config issue 2024-02-24 22:35:11 -08:00
.gitignore refac 2024-09-06 04:59:20 +02:00
dev.sh feat: add Feishu OAuth integration 2025-09-12 14:09:32 +08:00
requirements-min.txt chore: aiohttp 2026-01-09 18:10:27 +04:00
requirements.txt chore: aiohttp 2026-01-09 18:10:27 +04:00
start.sh 0.6.33 (#18118) 2025-10-07 16:20:27 -05:00
start_windows.bat fix: windows start script 2025-06-27 15:46:38 +04:00