mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[GH-ISSUE #22571] issue: Silent File Drop: Embedding 503 When Ollama Model TTL Expires During Docling Processing #58418
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jannefleischer on GitHub (Mar 11, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/22571
Disclaimer: The analysis of this issue has main been done by gpt5-mini and claude sonnet 4.6 :/
Check Existing Issues
Installation Method
Docker
Open WebUI Version
mainbranch, tested March 2026 ( WEBUI_BUILD_VERSION=a7271532f8a38da46785afcaa7e65f9a45e7d753 )Ollama Version (if applicable)
0.17.7
Operating System
Linux (WSL2 on Windows, Ubuntu-based).
Browser (if applicable)
Not relevant — error occurs fully server-side and is not surfaced in the browser at all.
Confirmation
README.md.Expected Behavior
When a large file (e.g. a multi-hundred-page PDF) is added to a Knowledge Collection
and processed by an external document processor (docling-serve), the resulting text
chunks should be embedded and the file should appear in the collection with its chunks
searchable.
If embedding fails for any reason, the file should be marked as
failedin the UIwith a visible error message, so the user knows to retry.
Actual Behavior
The file silently disappears. No error is shown in the UI. The file upload appears
to succeed, but the Knowledge Collection remains empty (or the file is not linked).
Internally, the file's
data.statusin the SQLite DB either staysnullor neverreaches
completed. The vector store has no chunks for this file.Steps to Reproduce
Prerequisites:
the content extraction backend
Steps:
bge-m3) is loaded (make any embeddingrequest to warm it up, or simply open a chat)
and Ollama unloads it (verify:
curl http://localhost:11434/api/psshould showno loaded models)
docker logs -f docling-serve;look for completion of the file)
What is happening internally:
process_file()which fires all embeddingbatch requests simultaneously as parallel async coroutines
503 Service UnavailableIndexError: list index out of range(the response bodyis empty/unexpected and index 0 does not exist)
Logs & Screenshots
Docker container logs (
docker logs open-webui 2>&1 | grep -A2 "503\|IndexError"):SQLite state after the failed upload:
Additional Information
Root cause (code):
routers/knowledge.py~L407–465:add_file_to_knowledge_by_idcallsprocess_file()synchronously with no retry logic
causes an unhandled
IndexErrorWorkaround (confirmed working):
Add to
.env:OLLAMA_KEEP_ALIVE=30mprevents TTL expiry during long docling processing runs.RAG_EMBEDDING_BATCH_SIZE=64reduces the number of parallel requests, loweringcollision probability if Ollama is briefly busy.
Suggested fix:
Add retry with exponential backoff for 503 responses in the embedding utility
(
retrieval/utils.pyor wherever batches are assembled):Alternatively, mark the file as
failedwith a user-visible error instead ofcrashing silently.
@tjbck commented on GitHub (Mar 25, 2026):
Addressed in dev.