mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
issue: Race Condition during Web Search/RAG leading to chromadb.errors.InvalidCollectionException
#5094
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 @realies on GitHub (May 7, 2025).
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.7
Ollama Version (if applicable)
v0.6.8
Operating System
Linux 6.12.24
Browser (if applicable)
N/A
Confirmation
README.md.Expected Behavior
When performing a chat query that triggers the web search functionality (RAG), the process should fetch web results, embed them using the configured embedding model, store them in the vector database (ChromaDB), retrieve the relevant context, and use this context to generate an enhanced response from the LLM without backend errors.
Actual Behavior
During chats involving web search, the Open WebUI backend log shows repeated
chromadb.errors.InvalidCollectionException: Collection web-search-... does not exist.errors. This appears to happen during the context retrieval step (get_all_items_from_collections/get_doccalls originating fromchat_completion_files_handler).The logs indicate a pattern where existing collections are deleted and then immediately re-added, suggesting a possible race condition where the retrieval attempts to access the collection before the underlying add/embedding process has fully completed and made the collection available again in ChromaDB.
This potentially prevents the web search context from being used correctly by the LLM or could lead to chat interruptions/failures.
Steps to Reproduce
mxbai-embed-large:335mwas used).searxngwas used).InvalidCollectionExceptionerrors during the chat processing.Logs & Screenshots
Additional Information
No response
@tjbck commented on GitHub (May 7, 2025):
We're unable to reproduce on our end but I highly suspect this has something to do with duplicate urls,
b50dcb1862may have addressed this issue. Keep us updated!