Files
open-webui-ai4me/backend/open_webui/routers
Classic298andClaude a3ea7bf043 fix(retrieval): offload Loader.load to a worker thread so file uploads stop blocking the event loop (#23705)
Loader.load() dispatches to the underlying langchain document loaders
(PyMuPDF, Unstructured, python-docx, Tika, …) which are all
synchronous and CPU/IO-bound. process_file() awaited it directly on
the event loop, so parsing a non-trivial PDF/DOCX would freeze the
entire FastAPI app for the duration of the parse — which is what users
experience as "the server hangs whenever I upload a file."

Add an `aload()` async wrapper on Loader that runs the sync load on a
worker thread via asyncio.to_thread, and update process_file() to
await it. The sync API is preserved so existing callers that already
run inside run_in_threadpool (e.g. save_docs_to_vector_db) are
unaffected.

https://claude.ai/code/session_01JSr4NZSskEUQvoJnavVXh8

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-14 10:55:46 -05:00
..
2026-04-12 18:12:59 -05:00
2026-04-13 16:25:44 -05:00
2026-04-13 14:08:58 -05:00
2026-04-13 14:08:58 -05:00
2026-04-13 14:08:58 -05:00
2026-04-13 21:29:03 -05:00
2026-04-13 18:20:46 -05:00
2026-04-12 18:12:59 -05:00
2026-04-14 10:55:11 -05:00
2026-04-12 18:12:59 -05:00
2026-04-13 14:08:58 -05:00
2026-04-12 14:22:11 -05:00
2026-04-13 14:33:23 -05:00
2026-04-12 14:22:11 -05:00
2026-04-12 14:22:11 -05:00
2026-04-13 14:08:58 -05:00
2026-04-13 14:29:27 -05:00
2026-03-24 04:49:48 -05:00
2026-04-13 14:08:58 -05:00
2026-04-12 14:22:11 -05:00
2026-04-12 14:22:11 -05:00
2026-04-13 14:08:58 -05:00
2026-04-12 14:22:11 -05:00
2026-04-13 14:08:58 -05:00
2026-04-12 18:49:34 -05:00
2026-04-13 14:08:58 -05:00