Feature Request: Notification and Handling for Failed Embeddings in Open-WebUI
Description:
Currently, Open-WebUI displays a spinning progress bar during document uploads (embedding process). However, if an embedding fails for any reason (408, 429, 502, 504... whatever) the document is still uploaded, resulting in an empty context (empty vector database) without any user notification. This lack of feedback creates a frustrating user experience, as uploaded documents become unusable for RAG queries without any indication of the underlying issue.
Proposed Solution:
Implement a system to handle failed embeddings more robustly, including:
Clear Error Notification: Display a notification error message to the user if an embedding fails. This message should clearly indicate that the embedding process was unsuccessful and the document's context remains empty.
Prevent Upload on Failure: Optionally, provide a setting to prevent document uploads if the embedding process fails. This would ensure that only documents with successfully generated embeddings are added to the database.
Detailed Error Logging: Log detailed information about the embedding failure, including the specific error encountered, the document being processed, and any relevant parameters. This information can be invaluable for troubleshooting and identifying the root cause of the issue.
Benefits:
Improved User Experience: Users will be immediately aware of failed embeddings and can take appropriate action, such as retrying the upload or investigating the issue.
Data Integrity: Preventing uploads with failed embeddings ensures that the vector database only contains documents with valid and usable context.
Easier Debugging: Detailed error logging will simplify the process of identifying and resolving embedding failures.
Additional Considerations:
The error notification system should be user-friendly and provide clear instructions on how to proceed.
The option to prevent uploads on failure should be configurable, allowing users to choose the behavior that best suits their needs.
This feature is crucial for ensuring a smooth and reliable user experience with Open-WebUI, particularly when relying on RAG functionality. By addressing failed embeddings proactively, we can prevent silent errors and empower users to manage their documents effectively.
Is your feature request related to a problem? Please describe.
I'm always frustrated when I use RAG to query a document and the context is empty because the embedding process failed without being logged, notified, etc...
Originally created by @bgeneto on GitHub (Oct 21, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/6311
## Feature Request: Notification and Handling for Failed Embeddings in Open-WebUI
**Description:**
Currently, Open-WebUI displays a spinning progress bar during document uploads (embedding process). However, if an embedding fails for any reason (408, 429, 502, 504... whatever) the document is still uploaded, resulting in an empty context (empty vector database) without any user notification. This lack of feedback creates a frustrating user experience, as uploaded documents become unusable for RAG queries without any indication of the underlying issue.
**Proposed Solution:**
Implement a system to handle failed embeddings more robustly, including:
1. **Clear Error Notification:** Display a notification error message to the user if an embedding fails. This message should clearly indicate that the embedding process was unsuccessful and the document's context remains empty.
2. **Prevent Upload on Failure:** Optionally, provide a setting to prevent document uploads if the embedding process fails. This would ensure that only documents with successfully generated embeddings are added to the database.
3. **Detailed Error Logging:** Log detailed information about the embedding failure, including the specific error encountered, the document being processed, and any relevant parameters. This information can be invaluable for troubleshooting and identifying the root cause of the issue.
**Benefits:**
* **Improved User Experience:** Users will be immediately aware of failed embeddings and can take appropriate action, such as retrying the upload or investigating the issue.
* **Data Integrity:** Preventing uploads with failed embeddings ensures that the vector database only contains documents with valid and usable context.
* **Easier Debugging:** Detailed error logging will simplify the process of identifying and resolving embedding failures.
**Additional Considerations:**
* The error notification system should be user-friendly and provide clear instructions on how to proceed.
* The option to prevent uploads on failure should be configurable, allowing users to choose the behavior that best suits their needs.
This feature is crucial for ensuring a smooth and reliable user experience with Open-WebUI, particularly when relying on RAG functionality. By addressing failed embeddings proactively, we can prevent silent errors and empower users to manage their documents effectively.
**Is your feature request related to a problem? Please describe.**
I'm always frustrated when I use RAG to query a document and the context is empty because the embedding process failed without being logged, notified, etc...
This might be addressed with 0.3.35, testing wanted here!
Did a quick test with v0.3.35 and I'm still getting this error (below) logged but still nothing appears in the web ui. The document seems to be uploaded successful (but it hasn't).
Steps to reproduce:
choose openai as Embedding Model Engine;
type a wrong model name (Embedding Model) or even a wrong API base URL.
ERROR [open_webui.apps.retrieval.main] 'NoneType' object is not iterable
Traceback (most recent call last):
File "/app/backend/open_webui/apps/retrieval/main.py", line 734, in save_docs_to_vector_db
embeddings = embedding_function(
^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/apps/retrieval/utils.py", line 308, in <lambda>
return lambda query: generate_multiple(query, func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/apps/retrieval/utils.py", line 303, in generate_multiple
embeddings.extend(func(query[i : i + embedding_batch_size]))
TypeError: 'NoneType' object is not iterable
Collection file-a58fa935-a11f-45ee-a331-24cece1541bf does not exist.
400 Client Error: Bad Request for url: http://litellm:4000/v1/embeddings
<!-- gh-comment-id:2439806591 -->
@bgeneto commented on GitHub (Oct 27, 2024):
> This might be addressed with 0.3.35, testing wanted here!
Did a quick test with v0.3.35 and I'm still getting this error (below) logged but still nothing appears in the web ui. The document seems to be uploaded successful (but it hasn't).
Steps to reproduce:
- choose openai as Embedding Model Engine;
- type a wrong model name (Embedding Model) or even a wrong API base URL.
```
ERROR [open_webui.apps.retrieval.main] 'NoneType' object is not iterable
Traceback (most recent call last):
File "/app/backend/open_webui/apps/retrieval/main.py", line 734, in save_docs_to_vector_db
embeddings = embedding_function(
^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/apps/retrieval/utils.py", line 308, in <lambda>
return lambda query: generate_multiple(query, func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/apps/retrieval/utils.py", line 303, in generate_multiple
embeddings.extend(func(query[i : i + embedding_batch_size]))
TypeError: 'NoneType' object is not iterable
Collection file-a58fa935-a11f-45ee-a331-24cece1541bf does not exist.
400 Client Error: Bad Request for url: http://litellm:4000/v1/embeddings
```
Nov 30 22:21:25 kamala uvicorn[43405]: ^^^^^^^^^^^^^^^^^^^
Nov 30 22:21:25 kamala uvicorn[43405]: File "/usr/local/open-webui/src/backend/open_webui/apps/retrieval/utils.py", line 267, in <lambda>
Nov 30 22:21:25 kamala uvicorn[43405]: return lambda query: generate_multiple(query, func)
Nov 30 22:21:25 kamala uvicorn[43405]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 30 22:21:25 kamala uvicorn[43405]: File "/usr/local/open-webui/src/backend/open_webui/apps/retrieval/utils.py", line 262, in generate_multiple
Nov 30 22:21:25 kamala uvicorn[43405]: embeddings.extend(func(query[i : i + embedding_batch_size]))
Nov 30 22:21:25 kamala uvicorn[43405]: TypeError: 'NoneType' object is not iterable
Nov 30 22:21:25 kamala uvicorn[43405]: Collection file-9d686607-7c12-4f5f-8731-af3113ec31af does not exist.
Nov 30 22:21:25 kamala uvicorn[43405]: 500 Server Error: Internal Server Error for url: http://127.0.0.1:11431/embeddings
Nov 30 22:21:25 kamala uvicorn[43405]: INFO: 192.168.2.69:0 - "POST /api/v1/files/ HTTP/1.0" 200 OK
yes samesies, but it looks like it has to do with the llama-server embeddings:
Nov 30 22:21:25 kamala llama-server[14583]: slot update_slots: id 0 | task 913 | new prompt, n_ctx_slot = 8192, n_keep = 0, n_prompt_tokens = 1138
Nov 30 22:21:25 kamala llama-server[14583]: slot release: id 0 | task 913 | stop processing: n_past = 0, truncated = 0
Nov 30 22:21:25 kamala llama-server[14583]: srv send_error: task id = 913, error: input is too large to process. increase the physical batch size
Nov 30 22:21:25 kamala llama-server[14583]: srv update_slots: no tokens to decode
Nov 30 22:21:25 kamala llama-server[14583]: slot launch_slot_: id 0 | task 914 | processing task
Nov 30 22:21:25 kamala llama-server[14583]: slot update_slots: id 0 | task 914 | new prompt, n_ctx_slot = 8192, n_keep = 0, n_prompt_tokens = 896
Nov 30 22:21:25 kamala llama-server[14583]: slot release: id 0 | task 914 | stop processing: n_past = 0, truncated = 0
Nov 30 22:21:25 kamala llama-server[14583]: srv send_error: task id = 914, error: input is too large to process. increase the physical batch size
Nov 30 22:21:25 kamala llama-server[14583]: srv update_slots: no tokens to decode
Nov 30 22:21:25 kamala llama-server[14583]: srv update_slots: all slots are idle
i've been messing with the server settings for the embedding and i'm not sure what speaks with what yet.
<!-- gh-comment-id:2509404253 -->
@unclemusclez commented on GitHub (Nov 30, 2024):
```
Nov 30 22:21:25 kamala uvicorn[43405]: ^^^^^^^^^^^^^^^^^^^
Nov 30 22:21:25 kamala uvicorn[43405]: File "/usr/local/open-webui/src/backend/open_webui/apps/retrieval/utils.py", line 267, in <lambda>
Nov 30 22:21:25 kamala uvicorn[43405]: return lambda query: generate_multiple(query, func)
Nov 30 22:21:25 kamala uvicorn[43405]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 30 22:21:25 kamala uvicorn[43405]: File "/usr/local/open-webui/src/backend/open_webui/apps/retrieval/utils.py", line 262, in generate_multiple
Nov 30 22:21:25 kamala uvicorn[43405]: embeddings.extend(func(query[i : i + embedding_batch_size]))
Nov 30 22:21:25 kamala uvicorn[43405]: TypeError: 'NoneType' object is not iterable
Nov 30 22:21:25 kamala uvicorn[43405]: Collection file-9d686607-7c12-4f5f-8731-af3113ec31af does not exist.
Nov 30 22:21:25 kamala uvicorn[43405]: 500 Server Error: Internal Server Error for url: http://127.0.0.1:11431/embeddings
Nov 30 22:21:25 kamala uvicorn[43405]: INFO: 192.168.2.69:0 - "POST /api/v1/files/ HTTP/1.0" 200 OK
```
yes samesies, but it looks like it has to do with the llama-server embeddings:
```
Nov 30 22:21:25 kamala llama-server[14583]: slot update_slots: id 0 | task 913 | new prompt, n_ctx_slot = 8192, n_keep = 0, n_prompt_tokens = 1138
Nov 30 22:21:25 kamala llama-server[14583]: slot release: id 0 | task 913 | stop processing: n_past = 0, truncated = 0
Nov 30 22:21:25 kamala llama-server[14583]: srv send_error: task id = 913, error: input is too large to process. increase the physical batch size
Nov 30 22:21:25 kamala llama-server[14583]: srv update_slots: no tokens to decode
Nov 30 22:21:25 kamala llama-server[14583]: slot launch_slot_: id 0 | task 914 | processing task
Nov 30 22:21:25 kamala llama-server[14583]: slot update_slots: id 0 | task 914 | new prompt, n_ctx_slot = 8192, n_keep = 0, n_prompt_tokens = 896
Nov 30 22:21:25 kamala llama-server[14583]: slot release: id 0 | task 914 | stop processing: n_past = 0, truncated = 0
Nov 30 22:21:25 kamala llama-server[14583]: srv send_error: task id = 914, error: input is too large to process. increase the physical batch size
Nov 30 22:21:25 kamala llama-server[14583]: srv update_slots: no tokens to decode
Nov 30 22:21:25 kamala llama-server[14583]: srv update_slots: all slots are idle
```
i've been messing with the server settings for the embedding and i'm not sure what speaks with what yet.
`/usr/local/bin/llama-server --model models/bge-m3-FP16.gguf -a bge-m3 --parallel 4 --embeddings -c 0 -b 2048 --port 11431 --host 127.0.0.1 -t 2 -fa -ngl 999 --no-mmap`
i'm using 0.4.6 from the main branch
@unclemusclez would appreciate if you could continue your investigation here. My intuition is telling me this error would occur if something's gone rouge from the embedding process from the external server like Ollama, or OpenAI compatible endpoints. Keep us posted!
<!-- gh-comment-id:2509516904 -->
@tjbck commented on GitHub (Dec 1, 2024):
@unclemusclez would appreciate if you could continue your investigation here. My intuition is telling me this error would occur if something's gone rouge from the embedding process from the external server like Ollama, or OpenAI compatible endpoints. Keep us posted!
@unclemusclez would appreciate if you could continue your investigation here. My intuition is telling me this error would occur if something's gone rouge from the embedding process from the external server like Ollama, or OpenAI compatible endpoints. Keep us posted!
I was going to downgrade, and then I noticed that the Apache site only offers the standard version. I originally compiled the code from source. This standard version most likely enables some extra features like PDFBox.
As it turns out, Tika is amazing and also processes video with FFMPEG and a bunch of other stuff. I will for sure be looking more into this.
I am using 3.0.0 Beta, but I assume all the way up to the most recent dev versions of Tika will work.
<!-- gh-comment-id:2509552193 -->
@unclemusclez commented on GitHub (Dec 1, 2024):
> @unclemusclez would appreciate if you could continue your investigation here. My intuition is telling me this error would occur if something's gone rouge from the embedding process from the external server like Ollama, or OpenAI compatible endpoints. Keep us posted!
I believe the issue is that people are running `server-core`, and not `server-standard`. https://tika.apache.org/download.html
I was going to downgrade, and then I noticed that the Apache site only offers the standard version. I originally compiled the code from source. This standard version most likely enables some extra features like `PDFBox`.
As it turns out, Tika is amazing and also processes video with FFMPEG and a bunch of other stuff. I will for sure be looking more into this.
I am using 3.0.0 Beta, but I assume all the way up to the most recent dev versions of Tika will work.
@bgeneto have you tried what i have mentioned the above? if it resolves the issue we can probably close the ticket.
I am assuming you were using tika-server-core for extraction.
<!-- gh-comment-id:2513512538 -->
@unclemusclez commented on GitHub (Dec 3, 2024):
@bgeneto have you tried what i have mentioned the above? if it resolves the issue we can probably close the ticket.
I am assuming you were using `tika-server-core` for extraction.
@bgeneto have you tried what i have mentioned the above? if it resolves the issue we can probably close the ticket.
I am assuming you were using tika-server-core for extraction.
The initial issue reported was unrelated to Tika, although I utilize it and suspect that a Tika failure might not trigger a proper error message in the web UI (however, I did not investigate this further).
The actual issue was solely related to a failure of the OpenAI-compatible or Ollama embedding endpoint. For instance, providing an incorrect endpoint URI would not trigger an error, yet the uploaded file would still be accessible to the user in the Knowledge area, albeit unusable.
After testing with v0.4.7, I can confirm that this issue is now resolved. The notification message appears in the web UI (as shown in the attached image), and the document is no longer available in the Knowledge collection. Note that the document is not deleted from the uploads directory, which may lead to a duplicate document in the disk if uploaded again.
Considering the resolution, I believe it is safe to close this issue. Thank you.
<!-- gh-comment-id:2515493958 -->
@bgeneto commented on GitHub (Dec 3, 2024):
> @bgeneto have you tried what i have mentioned the above? if it resolves the issue we can probably close the ticket.
>
> I am assuming you were using `tika-server-core` for extraction.
The initial issue reported was unrelated to Tika, although I utilize it and suspect that a Tika failure might not trigger a proper error message in the web UI (however, I did not investigate this further).
The actual issue was solely related to a failure of the OpenAI-compatible or Ollama embedding endpoint. For instance, providing an incorrect endpoint URI would not trigger an error, yet the uploaded file would still be accessible to the user in the Knowledge area, albeit unusable.
After testing with v0.4.7, I can confirm that this issue is now resolved. The notification message appears in the web UI (as shown in the attached image), and the document is no longer available in the Knowledge collection. **Note that the document is not deleted from the uploads directory**, which may lead to a duplicate document in the disk if uploaded again.
Considering the resolution, I believe it is safe to close this issue. Thank you.

@Lanhild has reported that the uploaded document fails to parse if it contains CJK characters. Let me know if that has the issue for other people as well!
<!-- gh-comment-id:2515617020 -->
@tjbck commented on GitHub (Dec 3, 2024):
@Lanhild has reported that the uploaded document fails to parse if it contains CJK characters. Let me know if that has the issue for other people as well!
I encountered an error message [ERROR: 'NoneType' object is not iterable] while using internet search with Google PSE, but I don't know where the issue is. I used the OpenAI embedding model text-embedding-3-large. @tjbck
<!-- gh-comment-id:2516111335 -->
@ZhenhongDu commented on GitHub (Dec 4, 2024):
I encountered an error message [ERROR: 'NoneType' object is not iterable] while using internet search with Google PSE, but I don't know where the issue is. I used the OpenAI embedding model `text-embedding-3-large`. @tjbck
When I changed the OpenAI embedding model provider, it works again. Sorry for disturbing you. But indeed, if we know the reason and stop the next action, maybe a good choice when we encounter an error.
<!-- gh-comment-id:2516220076 -->
@ZhenhongDu commented on GitHub (Dec 4, 2024):
When I changed the OpenAI embedding model provider, it works again. Sorry for disturbing you. But indeed, if we know the reason and stop the next action, maybe a good choice when we encounter an error.
me too, I found that if I uploaded a file larger than 1M, it would be failed
<!-- gh-comment-id:2517423260 -->
@ycz87 commented on GitHub (Dec 4, 2024):

me too, I found that if I uploaded a file larger than 1M, it would be failed
Hi @ all.
As i posted in the Discussions page, Issues about uploading Errors for PDF, DOC, etc. to use in RAG Knowledge.
IMHO this comes, because there is no documentation what format are currently supported. The webui DOCS says NOTHING which PDF, DOC or other format is parsed correct.
I also get an Error with uploading normal PDF with no restriction, where you can copy all text in any pdf Reader: Failed to upload: Extracted content is not available for this file. Please ensure that the file is processed before proceeding.
<!-- gh-comment-id:2595162166 -->
@Robertde34 commented on GitHub (Jan 16, 2025):
Hi @ all.
As i posted in the Discussions page, Issues about uploading Errors for PDF, DOC, etc. to use in RAG Knowledge.
IMHO this comes, because there is **no documentation what format** are currently supported. The webui DOCS says NOTHING which PDF, DOC or other format is parsed correct.
I also get an Error with uploading normal PDF with no restriction, where you can copy all text in any pdf Reader:
**Failed to upload: Extracted content is not available for this file. Please ensure that the file is processed before proceeding.**
So, for the DEV Team, please provide us first with Information **about formats.** You can't guess that.
https://docs.openwebui.com/features/rag#rag-embedding-support
Thanks
<!-- gh-comment-id:2595440358 -->
@bgeneto commented on GitHub (Jan 16, 2025):
@Robertde34 you can try using apache tika for text/content extraction. If you are using docker:
```yaml
tika:
image: apache/tika:3.0.0.0-full
container_name: tika
hostname: tika
command: -c /tika-config.xml
restart: always
environment:
- JAVA_OPTS=-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Xmx3584M
deploy:
resources:
limits:
memory: 4096M
```
INFO: 172.17.7.148:0 - "GET /api/v1/knowledge/cd6c3afe-d046-49fb-bd38-e6e261ff8fd2 HTTP/1.1" 200 OK
WARNI [python_multipart.multipart] Skipping data after last boundary
INFO [open_webui.routers.files] file.content_type: application/pdf
ERROR [open_webui.routers.retrieval] Error calling Tika: Not Found
Traceback (most recent call last):
File "/app/backend/open_webui/routers/retrieval.py", line 884, in process_file
docs = loader.load(
^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/loaders/main.py", line 127, in load
docs = loader.load()
^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/loaders/main.py", line 115, in load
raise Exception(f"Error calling Tika: {r.reason}")
Exception: Error calling Tika: Not Found
ERROR [open_webui.routers.files] 400: Error calling Tika: Not Found
Traceback (most recent call last):
File "/app/backend/open_webui/routers/retrieval.py", line 884, in process_file
docs = loader.load(
^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/loaders/main.py", line 127, in load
docs = loader.load()
So has anyone Tika with docker working....?!
<!-- gh-comment-id:2624289802 -->
@Robertde34 commented on GitHub (Jan 30, 2025):
Okay, thanks for this, I have tried to setup Tika, but it seems **not working**.
I have no "tika-config.xml" so i used the WEBUI DOC: https://docs.openwebui.com/tutorials/integrations/apachetika/
-- DOCKER-INSTALL --
docker run -d --name tika -p 9998:9998 --restart unless-stopped apache/tika:latest-full
--TEST ---
curl -X GET http://localhost:9998/tika
This is Tika Server (Apache Tika 3.0.0). Please PUT
WEBUI Setup:
Admin --> Embedding-Modell-Engine --> Engine Tika: http://localhost:9998/tika
== DOCKER-LOG ===
```
INFO: 172.17.7.148:0 - "GET /api/v1/knowledge/cd6c3afe-d046-49fb-bd38-e6e261ff8fd2 HTTP/1.1" 200 OK
WARNI [python_multipart.multipart] Skipping data after last boundary
INFO [open_webui.routers.files] file.content_type: application/pdf
ERROR [open_webui.routers.retrieval] Error calling Tika: Not Found
Traceback (most recent call last):
File "/app/backend/open_webui/routers/retrieval.py", line 884, in process_file
docs = loader.load(
^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/loaders/main.py", line 127, in load
docs = loader.load()
^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/loaders/main.py", line 115, in load
raise Exception(f"Error calling Tika: {r.reason}")
Exception: Error calling Tika: Not Found
ERROR [open_webui.routers.files] 400: Error calling Tika: Not Found
Traceback (most recent call last):
File "/app/backend/open_webui/routers/retrieval.py", line 884, in process_file
docs = loader.load(
^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/loaders/main.py", line 127, in load
docs = loader.load()
```
So has anyone Tika with docker working....?!
INFO: 172.17.7.148:0 - "GET /api/v1/knowledge/cd6c3afe-d046-49fb-bd38-e6e261ff8fd2 HTTP/1.1" 200 OK
WARNI [python_multipart.multipart] Skipping data after last boundary
INFO [open_webui.routers.files] file.content_type: application/pdf
ERROR [open_webui.routers.retrieval] Error calling Tika: Not Found
Traceback (most recent call last):
File "/app/backend/open_webui/routers/retrieval.py", line 884, in process_file
docs = loader.load(
^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/loaders/main.py", line 127, in load
docs = loader.load()
^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/loaders/main.py", line 115, in load
raise Exception(f"Error calling Tika: {r.reason}")
Exception: Error calling Tika: Not Found
ERROR [open_webui.routers.files] 400: Error calling Tika: Not Found
Traceback (most recent call last):
File "/app/backend/open_webui/routers/retrieval.py", line 884, in process_file
docs = loader.load(
^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/loaders/main.py", line 127, in load
docs = loader.load()
So has anyone Tika with docker working....?!
This is my working Tika docker compose and settings:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><properties><parsers><!-- Load TesseractOCRParser (could use DefaultParser if you want others too) --><parserclass="org.apache.tika.parser.ocr.TesseractOCRParser"/><!-- OCR on Rendered Pages --><parserclass="org.apache.tika.parser.pdf.PDFParser"><params><!-- no_ocr - extract text only
ocr_only - don't extract text and just attempt OCR
ocr_and_text - extract text and attempt OCR (from Tika 1.24)
auto - extract text but if < 10 characters try OCR
--><paramname="ocrStrategy"type="string">auto</param><paramname="ocrImageType"type="string">rgb</param><paramname="ocrDPI"type="int">100</param></params></parser></parsers></properties>
<!-- gh-comment-id:2624520102 -->
@bgeneto commented on GitHub (Jan 30, 2025):
> Okay, thanks for this, I have tried to setup Tika, but it seems **not working**.
>
> I have no "tika-config.xml" so i used the WEBUI DOC: https://docs.openwebui.com/tutorials/integrations/apachetika/
>
> -- DOCKER-INSTALL -- docker run -d --name tika -p 9998:9998 --restart unless-stopped apache/tika:latest-full
>
> --TEST --- curl -X GET http://localhost:9998/tika This is Tika Server (Apache Tika 3.0.0). Please PUT
>
> WEBUI Setup: Admin --> Embedding-Modell-Engine --> Engine Tika: http://localhost:9998/tika
>
> == DOCKER-LOG ===
>
> ```
> INFO: 172.17.7.148:0 - "GET /api/v1/knowledge/cd6c3afe-d046-49fb-bd38-e6e261ff8fd2 HTTP/1.1" 200 OK
> WARNI [python_multipart.multipart] Skipping data after last boundary
> INFO [open_webui.routers.files] file.content_type: application/pdf
> ERROR [open_webui.routers.retrieval] Error calling Tika: Not Found
> Traceback (most recent call last):
> File "/app/backend/open_webui/routers/retrieval.py", line 884, in process_file
> docs = loader.load(
> ^^^^^^^^^^^^
> File "/app/backend/open_webui/retrieval/loaders/main.py", line 127, in load
> docs = loader.load()
> ^^^^^^^^^^^^^
> File "/app/backend/open_webui/retrieval/loaders/main.py", line 115, in load
> raise Exception(f"Error calling Tika: {r.reason}")
> Exception: Error calling Tika: Not Found
> ERROR [open_webui.routers.files] 400: Error calling Tika: Not Found
> Traceback (most recent call last):
> File "/app/backend/open_webui/routers/retrieval.py", line 884, in process_file
> docs = loader.load(
> ^^^^^^^^^^^^
> File "/app/backend/open_webui/retrieval/loaders/main.py", line 127, in load
> docs = loader.load()
> ```
>
> So has anyone Tika with docker working....?!
This is my working Tika docker compose and settings:
```yaml
tika:
image: apache/tika:3.0.0.0-full
container_name: tika
hostname: tika
command: -c /tika-config.xml
restart: always
environment:
- JAVA_OPTS=-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Xmx3584M
deploy:
resources:
limits:
memory: 4096M
#ports:
# - "9998:9998"
volumes:
- ./tika-config-rendered.xml:/tika-config.xml
```
`tika-config-rendered.xml`
```xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<properties>
<parsers>
<!-- Load TesseractOCRParser (could use DefaultParser if you want others too) -->
<parser class="org.apache.tika.parser.ocr.TesseractOCRParser"/>
<!-- OCR on Rendered Pages -->
<parser class="org.apache.tika.parser.pdf.PDFParser">
<params>
<!-- no_ocr - extract text only
ocr_only - don't extract text and just attempt OCR
ocr_and_text - extract text and attempt OCR (from Tika 1.24)
auto - extract text but if < 10 characters try OCR
-->
<param name="ocrStrategy" type="string">auto</param>
<param name="ocrImageType" type="string">rgb</param>
<param name="ocrDPI" type="int">100</param>
</params>
</parser>
</parsers>
</properties>
```
When I upload a 5M XLSX file to the knowledge base, I get the following message: "detail": "Extracted content is not available for this file. Please ensure that the file is processed before proceeding." What am I supposed to do, What are the reasons for this?
<!-- gh-comment-id:2680791837 -->
@czyCoder commented on GitHub (Feb 25, 2025):
When I upload a 5M XLSX file to the knowledge base, I get the following message: "detail": "Extracted content is not available for this file. Please ensure that the file is processed before proceeding." What am I supposed to do, What are the reasons for this?
When I upload a 5M XLSX file to the knowledge base, I get the following message: "detail": "Extracted content is not available for this file. Please ensure that the file is processed before proceeding." What am I supposed to do, What are the reasons for this?
Maybe read the DOCs.... Tip: include <parser class="org.apache.tika.parser.DefaultParser">
<!-- gh-comment-id:2681903577 -->
@bgeneto commented on GitHub (Feb 25, 2025):
> When I upload a 5M XLSX file to the knowledge base, I get the following message: "detail": "Extracted content is not available for this file. Please ensure that the file is processed before proceeding." What am I supposed to do, What are the reasons for this?
Maybe read the DOCs.... Tip: include `<parser class="org.apache.tika.parser.DefaultParser">`
https://tika.apache.org/1.10/formats.html
when i upload a PDF, the tika warn it. How to solve it?
ps: i use Synology 920+ DSM7.2.1 docker
<!-- gh-comment-id:2781218040 -->
@zhengxujin commented on GitHub (Apr 6, 2025):

when i upload a PDF, the tika warn it. How to solve it?
ps: i use Synology 920+ DSM7.2.1 docker
<!-- gh-comment-id:2976741382 -->
@Mte90 commented on GitHub (Jun 16, 2025):
I think that is related to https://github.com/open-webui/open-webui/issues/10679#issuecomment-2976710842
@anengineerdude commented on GitHub (Oct 3, 2025):
I'm encountering this if the embedding model call fails. There is no feedback to user at all, the document appears to upload and the model tends to hallucinate and make up content frustrating the user.
I would at least some warning or indication to the user that the upload is not available to the chat.
Here is an example log:
2025-10-03T18:42:13.505926280Z 2025-10-03 18:42:13.505 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:1255 - Using token text splitter: cl100k_base
2025-10-03T18:42:13.527391952Z 2025-10-03 18:42:13.526 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:1345 - generating embeddings for 149d83d4-6e7b-438a-8795-fdefab088c39
2025-10-03T18:42:16.516078591Z 2025-10-03 18:42:16.515 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 198.186.26.35:0 - "GET /_app/version.json HTTP/1.1" 200
2025-10-03T18:42:16.781847729Z 2025-10-03 18:42:16.778 | ERROR | open_webui.retrieval.utils:generate_openai_batch_embeddings:825 - Error generating openai batch embeddings: 400 Client Error: Bad Request for url: http://litellm.litellm.svc:4000/embeddings
2025-10-03T18:42:16.781934839Z Traceback (most recent call last):
2025-10-03T18:42:16.781944732Z
2025-10-03T18:42:16.781951885Z File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
2025-10-03T18:42:16.781958389Z self._bootstrap_inner()
2025-10-03T18:42:16.781964237Z │ └ <function Thread._bootstrap_inner at 0x7ad0df03c9a0>
2025-10-03T18:42:16.781970509Z └ <WorkerThread(AnyIO worker thread, started 135034484803264)>
...
...
...
2025-10-03T18:42:16.782382474Z requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http://litellm.litellm.svc:4000/embeddings
2025-10-03T18:42:16.782490193Z 2025-10-03 18:42:16.781 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:1381 - embeddings generated 0 for 1 items
<!-- gh-comment-id:3366859114 -->
@anengineerdude commented on GitHub (Oct 3, 2025):
I'm encountering this if the embedding model call fails. There is no feedback to user at all, the document appears to upload and the model tends to hallucinate and make up content frustrating the user.
I would at least some warning or indication to the user that the upload is not available to the chat.
Here is an example log:
```log
2025-10-03T18:42:13.505926280Z 2025-10-03 18:42:13.505 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:1255 - Using token text splitter: cl100k_base
2025-10-03T18:42:13.527391952Z 2025-10-03 18:42:13.526 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:1345 - generating embeddings for 149d83d4-6e7b-438a-8795-fdefab088c39
2025-10-03T18:42:16.516078591Z 2025-10-03 18:42:16.515 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 198.186.26.35:0 - "GET /_app/version.json HTTP/1.1" 200
2025-10-03T18:42:16.781847729Z 2025-10-03 18:42:16.778 | ERROR | open_webui.retrieval.utils:generate_openai_batch_embeddings:825 - Error generating openai batch embeddings: 400 Client Error: Bad Request for url: http://litellm.litellm.svc:4000/embeddings
2025-10-03T18:42:16.781934839Z Traceback (most recent call last):
2025-10-03T18:42:16.781944732Z
2025-10-03T18:42:16.781951885Z File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
2025-10-03T18:42:16.781958389Z self._bootstrap_inner()
2025-10-03T18:42:16.781964237Z │ └ <function Thread._bootstrap_inner at 0x7ad0df03c9a0>
2025-10-03T18:42:16.781970509Z └ <WorkerThread(AnyIO worker thread, started 135034484803264)>
...
...
...
2025-10-03T18:42:16.782382474Z requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http://litellm.litellm.svc:4000/embeddings
2025-10-03T18:42:16.782490193Z 2025-10-03 18:42:16.781 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:1381 - embeddings generated 0 for 1 items
```
This @anengineerdude is also the case when embeddings / RAG are disabled and full content mode is used. If document processing fails for whatever reason, an empty document is returned and there is no information to the user of any issue. This makes the lay user, who is not checking the extracted content, to believe their doc would be in the context now, but it isnt...
(An easy way to reproduce is, for example, to set a max number of pages in docling and upload a document with more pages than that)
<!-- gh-comment-id:3377195165 -->
@adhusch commented on GitHub (Oct 7, 2025):
This @anengineerdude is also the case when embeddings / RAG are disabled and full content mode is used. If document processing fails for whatever reason, an empty document is returned and there is no information to the user of any issue. This makes the lay user, who is not checking the extracted content, to believe their doc would be in the context now, but it isnt...
(An easy way to reproduce is, for example, to set a max number of pages in docling and upload a document with more pages than that)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @bgeneto on GitHub (Oct 21, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/6311
Feature Request: Notification and Handling for Failed Embeddings in Open-WebUI
Description:
Currently, Open-WebUI displays a spinning progress bar during document uploads (embedding process). However, if an embedding fails for any reason (408, 429, 502, 504... whatever) the document is still uploaded, resulting in an empty context (empty vector database) without any user notification. This lack of feedback creates a frustrating user experience, as uploaded documents become unusable for RAG queries without any indication of the underlying issue.
Proposed Solution:
Implement a system to handle failed embeddings more robustly, including:
Benefits:
Additional Considerations:
This feature is crucial for ensuring a smooth and reliable user experience with Open-WebUI, particularly when relying on RAG functionality. By addressing failed embeddings proactively, we can prevent silent errors and empower users to manage their documents effectively.
Is your feature request related to a problem? Please describe.
I'm always frustrated when I use RAG to query a document and the context is empty because the embedding process failed without being logged, notified, etc...
@tjbck commented on GitHub (Oct 26, 2024):
This might be addressed with 0.3.35, testing wanted here!
@bgeneto commented on GitHub (Oct 27, 2024):
Did a quick test with v0.3.35 and I'm still getting this error (below) logged but still nothing appears in the web ui. The document seems to be uploaded successful (but it hasn't).
Steps to reproduce:
@unclemusclez commented on GitHub (Nov 30, 2024):
yes samesies, but it looks like it has to do with the llama-server embeddings:
i've been messing with the server settings for the embedding and i'm not sure what speaks with what yet.
/usr/local/bin/llama-server --model models/bge-m3-FP16.gguf -a bge-m3 --parallel 4 --embeddings -c 0 -b 2048 --port 11431 --host 127.0.0.1 -t 2 -fa -ngl 999 --no-mmapi'm using 0.4.6 from the main branch
@tjbck commented on GitHub (Dec 1, 2024):
@unclemusclez would appreciate if you could continue your investigation here. My intuition is telling me this error would occur if something's gone rouge from the embedding process from the external server like Ollama, or OpenAI compatible endpoints. Keep us posted!
@unclemusclez commented on GitHub (Dec 1, 2024):
I believe the issue is that people are running
server-core, and notserver-standard. https://tika.apache.org/download.htmlI was going to downgrade, and then I noticed that the Apache site only offers the standard version. I originally compiled the code from source. This standard version most likely enables some extra features like
PDFBox.As it turns out, Tika is amazing and also processes video with FFMPEG and a bunch of other stuff. I will for sure be looking more into this.
I am using 3.0.0 Beta, but I assume all the way up to the most recent dev versions of Tika will work.
@unclemusclez commented on GitHub (Dec 3, 2024):
@bgeneto have you tried what i have mentioned the above? if it resolves the issue we can probably close the ticket.
I am assuming you were using
tika-server-corefor extraction.@bgeneto commented on GitHub (Dec 3, 2024):
The initial issue reported was unrelated to Tika, although I utilize it and suspect that a Tika failure might not trigger a proper error message in the web UI (however, I did not investigate this further).
The actual issue was solely related to a failure of the OpenAI-compatible or Ollama embedding endpoint. For instance, providing an incorrect endpoint URI would not trigger an error, yet the uploaded file would still be accessible to the user in the Knowledge area, albeit unusable.
After testing with v0.4.7, I can confirm that this issue is now resolved. The notification message appears in the web UI (as shown in the attached image), and the document is no longer available in the Knowledge collection. Note that the document is not deleted from the uploads directory, which may lead to a duplicate document in the disk if uploaded again.
Considering the resolution, I believe it is safe to close this issue. Thank you.
@tjbck commented on GitHub (Dec 3, 2024):
@Lanhild has reported that the uploaded document fails to parse if it contains CJK characters. Let me know if that has the issue for other people as well!
@ZhenhongDu commented on GitHub (Dec 4, 2024):
I encountered an error message [ERROR: 'NoneType' object is not iterable] while using internet search with Google PSE, but I don't know where the issue is. I used the OpenAI embedding model
text-embedding-3-large. @tjbck@ZhenhongDu commented on GitHub (Dec 4, 2024):
When I changed the OpenAI embedding model provider, it works again. Sorry for disturbing you. But indeed, if we know the reason and stop the next action, maybe a good choice when we encounter an error.
@ycz87 commented on GitHub (Dec 4, 2024):
me too, I found that if I uploaded a file larger than 1M, it would be failed
@Robertde34 commented on GitHub (Jan 16, 2025):
Hi @ all.
As i posted in the Discussions page, Issues about uploading Errors for PDF, DOC, etc. to use in RAG Knowledge.
IMHO this comes, because there is no documentation what format are currently supported. The webui DOCS says NOTHING which PDF, DOC or other format is parsed correct.
I also get an Error with uploading normal PDF with no restriction, where you can copy all text in any pdf Reader:
Failed to upload: Extracted content is not available for this file. Please ensure that the file is processed before proceeding.
So, for the DEV Team, please provide us first with Information about formats. You can't guess that.
https://docs.openwebui.com/features/rag#rag-embedding-support
Thanks
@bgeneto commented on GitHub (Jan 16, 2025):
@Robertde34 you can try using apache tika for text/content extraction. If you are using docker:
@Robertde34 commented on GitHub (Jan 30, 2025):
Okay, thanks for this, I have tried to setup Tika, but it seems not working.
I have no "tika-config.xml" so i used the WEBUI DOC: https://docs.openwebui.com/tutorials/integrations/apachetika/
-- DOCKER-INSTALL --
docker run -d --name tika -p 9998:9998 --restart unless-stopped apache/tika:latest-full
--TEST ---
curl -X GET http://localhost:9998/tika
This is Tika Server (Apache Tika 3.0.0). Please PUT
WEBUI Setup:
Admin --> Embedding-Modell-Engine --> Engine Tika: http://localhost:9998/tika
== DOCKER-LOG ===
So has anyone Tika with docker working....?!
@bgeneto commented on GitHub (Jan 30, 2025):
This is my working Tika docker compose and settings:
tika-config-rendered.xml@czyCoder commented on GitHub (Feb 25, 2025):
When I upload a 5M XLSX file to the knowledge base, I get the following message: "detail": "Extracted content is not available for this file. Please ensure that the file is processed before proceeding." What am I supposed to do, What are the reasons for this?
@bgeneto commented on GitHub (Feb 25, 2025):
Maybe read the DOCs.... Tip: include
<parser class="org.apache.tika.parser.DefaultParser">https://tika.apache.org/1.10/formats.html
@zhengxujin commented on GitHub (Apr 6, 2025):
when i upload a PDF, the tika warn it. How to solve it?
ps: i use Synology 920+ DSM7.2.1 docker
@Mte90 commented on GitHub (Jun 16, 2025):
I think that is related to https://github.com/open-webui/open-webui/issues/10679#issuecomment-2976710842
@anengineerdude commented on GitHub (Oct 3, 2025):
I'm encountering this if the embedding model call fails. There is no feedback to user at all, the document appears to upload and the model tends to hallucinate and make up content frustrating the user.
I would at least some warning or indication to the user that the upload is not available to the chat.
Here is an example log:
@adhusch commented on GitHub (Oct 7, 2025):
This @anengineerdude is also the case when embeddings / RAG are disabled and full content mode is used. If document processing fails for whatever reason, an empty document is returned and there is no information to the user of any issue. This makes the lay user, who is not checking the extracted content, to believe their doc would be in the context now, but it isnt...
(An easy way to reproduce is, for example, to set a max number of pages in docling and upload a document with more pages than that)