mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 04:16:03 -05:00
[GH-ISSUE #14739] issue: MilvusException code=1100, caused by Document Intelligence metadata #56016
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 @SkypeForBusiness on GitHub (Jun 6, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/14739
Originally assigned to: @jackthgu on GitHub.
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.6.13
Ollama Version (if applicable)
No response
Operating System
Ubuntu 22.04
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Uploading a pdf file ~4MB should be loaded and used for RAG. I can ask questions on the document and they are answered based on its contents.
Actual Behavior
When uploading the pdf file there is a warning popup in the UI that says milvus is having an error. When I try to ask questions on the document, the model doesn't receive the contents.
Steps to Reproduce
Logs & Screenshots
2025-06-06 15:46:14.518 | ERROR | pymilvus.decorators:handler:140 - RPC error: [insert_rows], <MilvusException: (code=1100, message=the length (836438) of json field (metadata) exceeds max length (65536): invalid parameter[expected=valid length json string][actual=length exceeds max length])>, <Time:{'RPC start': '2025-06-06 15:46:14.505449', 'RPC error': '2025-06-06 15:46:14.518401'}> - {}
2025-06-06 15:46:14.518 | ERROR | open_webui.routers.retrieval:save_docs_to_vector_db:1223 - <MilvusException: (code=1100, message=the length (836438) of json field (metadata) exceeds max length (65536): invalid parameter[expected=valid length json string][actual=length exceeds max length])> - {}
Traceback (most recent call last):
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/threading.py", line 1002, in _bootstrap
self._bootstrap_inner()
│ └ <function Thread._bootstrap_inner at 0x7f3de5ab8e00>
└ <WorkerThread(AnyIO worker thread, started 139895599261248)>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
│ └ <function WorkerThread.run at 0x7f3c000c9ee0>
└ <WorkerThread(AnyIO worker thread, started 139895599261248)>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
result = context.run(func, *args)
│ │ │ └ ()
│ │ └ functools.partial(<function upload_file at 0x7f3cccaf4c20>, user=UserModel(id='da461710-1350-4432-9f3a-bdb2a09e821e', name='S...
│ └ <method 'run' of '_contextvars.Context' objects>
└ <_contextvars.Context object at 0x7f3be9736140>
File "/home/noahhermann/workspace/bbv/open-webui/backend/open_webui/routers/files.py", line 172, in upload_file
process_file(request, ProcessFileForm(file_id=id), user=user)
│ │ │ │ └ UserModel(id='da461710-1350-4432-9f3a-bdb2a09e821e', name='SkypeForBusiness', role='admin', prof...
│ │ │ └ 'f6de8037-61cc-4701-a8d4-fc4e26eda341'
│ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'>
│ └ <starlette.requests.Request object at 0x7f3be9b46590>
└ <function process_file at 0x7f3c872e8e00>
File "/home/noahhermann/workspace/bbv/open-webui/backend/open_webui/routers/retrieval.py", line 1375, in process_file
result = save_docs_to_vector_db(
└ <function save_docs_to_vector_db at 0x7f3c872a37e0>
File "/home/noahhermann/workspace/bbv/open-webui/backend/open_webui/retrieval/vector/dbs/milvus.py", line 307, in insert
return self.client.insert(
│ │ └ <function MilvusClient.insert at 0x7f3cccaa2980>
│ └ <pymilvus.milvus_client.milvus_client.MilvusClient object at 0x7f3cd40eab90>
└ <open_webui.retrieval.vector.dbs.milvus.MilvusClient object at 0x7f3cd5393610>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/milvus_client/milvus_client.py", line 225, in insert
raise ex from ex
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/milvus_client/milvus_client.py", line 221, in insert
res = conn.insert_rows(
│ └ <function GrpcHandler.insert_rows at 0x7f3ccca12e80>
└ <pymilvus.client.grpc_handler.GrpcHandler object at 0x7f3ccd651110>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/decorators.py", line 141, in handler
raise e from e
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/decorators.py", line 137, in handler
return func(*args, **kwargs)
│ │ └ {'partition_name': '', 'timeout': None}
│ └ (<pymilvus.client.grpc_handler.GrpcHandler object at 0x7f3ccd651110>, 'open_webui_file_f6de8037_61cc_4701_a8d4_fc4e26eda341',...
└ <function retry_on_rpc_failure..wrapper..handler at 0x7f3ccca12fc0>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/decorators.py", line 176, in handler
return func(self, *args, **kwargs)
│ │ │ └ {'partition_name': '', 'timeout': None}
│ │ └ ('open_webui_file_f6de8037_61cc_4701_a8d4_fc4e26eda341', [{'id': 'd436d3b2-418a-430d-b779-b0f22524cd11', 'vector': [0.0069341...
│ └ <pymilvus.client.grpc_handler.GrpcHandler object at 0x7f3ccd651110>
└ <function retry_on_rpc_failure..wrapper..handler at 0x7f3ccca12f20>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/decorators.py", line 116, in handler
raise e from e
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/decorators.py", line 86, in handler
return func(*args, **kwargs)
│ │ └ {'partition_name': '', 'timeout': None}
│ └ (<pymilvus.client.grpc_handler.GrpcHandler object at 0x7f3ccd651110>, 'open_webui_file_f6de8037_61cc_4701_a8d4_fc4e26eda341',...
└ <function GrpcHandler.insert_rows at 0x7f3ccca12d40>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py", line 498, in insert_rows
check_status(resp.status)
│ └ status {
│ error_code: IllegalArgument
│ reason: "the length (836438) of json field (metadata) exceeds max length (65536): in...
└ <function check_status at 0x7f3cd5017b00>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/client/utils.py", line 63, in check_status
raise MilvusException(status.code, status.reason, status.error_code)
│ │ │ └ error_code: IllegalArgument
│ │ │ reason: "the length (836438) of json field (metadata) exceeds max length (65536): invalid paramet...
│ │ └ error_code: IllegalArgument
│ │ reason: "the length (836438) of json field (metadata) exceeds max length (65536): invalid paramet...
│ └ error_code: IllegalArgument
│ reason: "the length (836438) of json field (metadata) exceeds max length (65536): invalid paramet...
└ <class 'pymilvus.exceptions.MilvusException'>
pymilvus.exceptions.MilvusException: <MilvusException: (code=1100, message=the length (836438) of json field (metadata) exceeds max length (65536): invalid parameter[expected=valid length json string][actual=length exceeds max length])>
2025-06-06 15:46:14.551 | ERROR | open_webui.routers.retrieval:process_file:1413 - <MilvusException: (code=1100, message=the length (836438) of json field (metadata) exceeds max length (65536): invalid parameter[expected=valid length json string][actual=length exceeds max length])> - {}
Traceback (most recent call last):
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/threading.py", line 1002, in _bootstrap
self._bootstrap_inner()
│ └ <function Thread._bootstrap_inner at 0x7f3de5ab8e00>
└ <WorkerThread(AnyIO worker thread, started 139895599261248)>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
│ └ <function WorkerThread.run at 0x7f3c000c9ee0>
└ <WorkerThread(AnyIO worker thread, started 139895599261248)>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
result = context.run(func, *args)
│ │ │ └ ()
│ │ └ functools.partial(<function upload_file at 0x7f3cccaf4c20>, user=UserModel(id='da461710-1350-4432-9f3a-bdb2a09e821e', name='S...
│ └ <method 'run' of '_contextvars.Context' objects>
└ <_contextvars.Context object at 0x7f3be9736140>
File "/home/noahhermann/workspace/bbv/open-webui/backend/open_webui/routers/files.py", line 172, in upload_file
process_file(request, ProcessFileForm(file_id=id), user=user)
│ │ │ │ └ UserModel(id='da461710-1350-4432-9f3a-bdb2a09e821e', name='SkypeForBusiness', role='admin', prof...
│ │ │ └ 'f6de8037-61cc-4701-a8d4-fc4e26eda341'
│ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'>
│ └ <starlette.requests.Request object at 0x7f3be9b46590>
└ <function process_file at 0x7f3c872e8e00>
File "/home/noahhermann/workspace/bbv/open-webui/backend/open_webui/routers/retrieval.py", line 1375, in process_file
result = save_docs_to_vector_db(
└ <function save_docs_to_vector_db at 0x7f3c872a37e0>
File "/home/noahhermann/workspace/bbv/open-webui/backend/open_webui/routers/retrieval.py", line 1224, in save_docs_to_vector_db
raise e
File "/home/noahhermann/workspace/bbv/open-webui/backend/open_webui/routers/retrieval.py", line 1216, in save_docs_to_vector_db
VECTOR_DB_CLIENT.insert(
│ └ <function MilvusClient.insert at 0x7f3cccaaaac0>
└ <open_webui.retrieval.vector.dbs.milvus.MilvusClient object at 0x7f3cd5393610>
File "/home/noahhermann/workspace/bbv/open-webui/backend/open_webui/retrieval/vector/dbs/milvus.py", line 307, in insert
return self.client.insert(
│ │ └ <function MilvusClient.insert at 0x7f3cccaa2980>
│ └ <pymilvus.milvus_client.milvus_client.MilvusClient object at 0x7f3cd40eab90>
└ <open_webui.retrieval.vector.dbs.milvus.MilvusClient object at 0x7f3cd5393610>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/milvus_client/milvus_client.py", line 225, in insert
raise ex from ex
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/milvus_client/milvus_client.py", line 221, in insert
res = conn.insert_rows(
│ └ <function GrpcHandler.insert_rows at 0x7f3ccca12e80>
└ <pymilvus.client.grpc_handler.GrpcHandler object at 0x7f3ccd651110>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/decorators.py", line 141, in handler
raise e from e
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/decorators.py", line 137, in handler
return func(*args, **kwargs)
│ │ └ {'partition_name': '', 'timeout': None}
│ └ (<pymilvus.client.grpc_handler.GrpcHandler object at 0x7f3ccd651110>, 'open_webui_file_f6de8037_61cc_4701_a8d4_fc4e26eda341',...
└ <function retry_on_rpc_failure..wrapper..handler at 0x7f3ccca12fc0>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/decorators.py", line 176, in handler
return func(self, *args, **kwargs)
│ │ │ └ {'partition_name': '', 'timeout': None}
│ │ └ ('open_webui_file_f6de8037_61cc_4701_a8d4_fc4e26eda341', [{'id': 'd436d3b2-418a-430d-b779-b0f22524cd11', 'vector': [0.0069341...
│ └ <pymilvus.client.grpc_handler.GrpcHandler object at 0x7f3ccd651110>
└ <function retry_on_rpc_failure..wrapper..handler at 0x7f3ccca12f20>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/decorators.py", line 116, in handler
raise e from e
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/decorators.py", line 86, in handler
return func(*args, **kwargs)
│ │ └ {'partition_name': '', 'timeout': None}
│ └ (<pymilvus.client.grpc_handler.GrpcHandler object at 0x7f3ccd651110>, 'open_webui_file_f6de8037_61cc_4701_a8d4_fc4e26eda341',...
└ <function GrpcHandler.insert_rows at 0x7f3ccca12d40>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py", line 498, in insert_rows
check_status(resp.status)
│ └ status {
│ error_code: IllegalArgument
│ reason: "the length (836438) of json field (metadata) exceeds max length (65536): in...
└ <function check_status at 0x7f3cd5017b00>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/client/utils.py", line 63, in check_status
raise MilvusException(status.code, status.reason, status.error_code)
│ │ │ └ error_code: IllegalArgument
│ │ │ reason: "the length (836438) of json field (metadata) exceeds max length (65536): invalid paramet...
│ │ └ error_code: IllegalArgument
│ │ reason: "the length (836438) of json field (metadata) exceeds max length (65536): invalid paramet...
│ └ error_code: IllegalArgument
│ reason: "the length (836438) of json field (metadata) exceeds max length (65536): invalid paramet...
└ <class 'pymilvus.exceptions.MilvusException'>
pymilvus.exceptions.MilvusException: <MilvusException: (code=1100, message=the length (836438) of json field (metadata) exceeds max length (65536): invalid parameter[expected=valid length json string][actual=length exceeds max length])>
2025-06-06 15:46:14.585 | ERROR | open_webui.routers.files:upload_file:181 - 400: <MilvusException: (code=1100, message=the length (836438) of json field (metadata) exceeds max length (65536): invalid parameter[expected=valid length json string][actual=length exceeds max length])> - {}
Traceback (most recent call last):
File "/home/noahhermann/workspace/bbv/open-webui/backend/open_webui/routers/retrieval.py", line 1403, in process_file
raise e
File "/home/noahhermann/workspace/bbv/open-webui/backend/open_webui/routers/retrieval.py", line 1375, in process_file
result = save_docs_to_vector_db(
└ <function save_docs_to_vector_db at 0x7f3c872a37e0>
File "/home/noahhermann/workspace/bbv/open-webui/backend/open_webui/routers/retrieval.py", line 1224, in save_docs_to_vector_db
raise e
File "/home/noahhermann/workspace/bbv/open-webui/backend/open_webui/routers/retrieval.py", line 1216, in save_docs_to_vector_db
VECTOR_DB_CLIENT.insert(
│ └ <function MilvusClient.insert at 0x7f3cccaaaac0>
└ <open_webui.retrieval.vector.dbs.milvus.MilvusClient object at 0x7f3cd5393610>
File "/home/noahhermann/workspace/bbv/open-webui/backend/open_webui/retrieval/vector/dbs/milvus.py", line 307, in insert
return self.client.insert(
│ │ └ <function MilvusClient.insert at 0x7f3cccaa2980>
│ └ <pymilvus.milvus_client.milvus_client.MilvusClient object at 0x7f3cd40eab90>
└ <open_webui.retrieval.vector.dbs.milvus.MilvusClient object at 0x7f3cd5393610>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/milvus_client/milvus_client.py", line 225, in insert
raise ex from ex
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/milvus_client/milvus_client.py", line 221, in insert
res = conn.insert_rows(
│ └ <function GrpcHandler.insert_rows at 0x7f3ccca12e80>
└ <pymilvus.client.grpc_handler.GrpcHandler object at 0x7f3ccd651110>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/decorators.py", line 141, in handler
raise e from e
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/decorators.py", line 137, in handler
return func(*args, **kwargs)
│ │ └ {'partition_name': '', 'timeout': None}
│ └ (<pymilvus.client.grpc_handler.GrpcHandler object at 0x7f3ccd651110>, 'open_webui_file_f6de8037_61cc_4701_a8d4_fc4e26eda341',...
└ <function retry_on_rpc_failure..wrapper..handler at 0x7f3ccca12fc0>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/decorators.py", line 176, in handler
return func(self, *args, **kwargs)
│ │ │ └ {'partition_name': '', 'timeout': None}
│ │ └ ('open_webui_file_f6de8037_61cc_4701_a8d4_fc4e26eda341', [{'id': 'd436d3b2-418a-430d-b779-b0f22524cd11', 'vector': [0.0069341...
│ └ <pymilvus.client.grpc_handler.GrpcHandler object at 0x7f3ccd651110>
└ <function retry_on_rpc_failure..wrapper..handler at 0x7f3ccca12f20>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/decorators.py", line 116, in handler
raise e from e
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/decorators.py", line 86, in handler
return func(*args, **kwargs)
│ │ └ {'partition_name': '', 'timeout': None}
│ └ (<pymilvus.client.grpc_handler.GrpcHandler object at 0x7f3ccd651110>, 'open_webui_file_f6de8037_61cc_4701_a8d4_fc4e26eda341',...
└ <function GrpcHandler.insert_rows at 0x7f3ccca12d40>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py", line 498, in insert_rows
check_status(resp.status)
│ └ status {
│ error_code: IllegalArgument
│ reason: "the length (836438) of json field (metadata) exceeds max length (65536): in...
└ <function check_status at 0x7f3cd5017b00>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/pymilvus/client/utils.py", line 63, in check_status
raise MilvusException(status.code, status.reason, status.error_code)
│ │ │ └ error_code: IllegalArgument
│ │ │ reason: "the length (836438) of json field (metadata) exceeds max length (65536): invalid paramet...
│ │ └ error_code: IllegalArgument
│ │ reason: "the length (836438) of json field (metadata) exceeds max length (65536): invalid paramet...
│ └ error_code: IllegalArgument
│ reason: "the length (836438) of json field (metadata) exceeds max length (65536): invalid paramet...
└ <class 'pymilvus.exceptions.MilvusException'>
pymilvus.exceptions.MilvusException: <MilvusException: (code=1100, message=the length (836438) of json field (metadata) exceeds max length (65536): invalid parameter[expected=valid length json string][actual=length exceeds max length])>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/threading.py", line 1002, in _bootstrap
self._bootstrap_inner()
│ └ <function Thread._bootstrap_inner at 0x7f3de5ab8e00>
└ <WorkerThread(AnyIO worker thread, started 139895599261248)>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
│ └ <function WorkerThread.run at 0x7f3c000c9ee0>
└ <WorkerThread(AnyIO worker thread, started 139895599261248)>
File "/home/noahhermann/.pyenv/versions/3.11.11/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
result = context.run(func, *args)
│ │ │ └ ()
│ │ └ functools.partial(<function upload_file at 0x7f3cccaf4c20>, user=UserModel(id='da461710-1350-4432-9f3a-bdb2a09e821e', name='S...
│ └ <method 'run' of '_contextvars.Context' objects>
└ <_contextvars.Context object at 0x7f3be9736140>
File "/home/user/open-webui/backend/open_webui/routers/retrieval.py", line 1420, in process_file
raise HTTPException(
└ <class 'fastapi.exceptions.HTTPException'>
fastapi.exceptions.HTTPException: 400: <MilvusException: (code=1100, message=the length (836438) of json field (metadata) exceeds max length (65536): invalid parameter[expected=valid length json string][actual=length exceeds max length])>
2025-06-06 15:46:14.620 | ERROR | open_webui.routers.files:upload_file:182 - Error processing file: f6de8037-61cc-4701-a8d4-fc4e26eda341 - {}
Additional Information
No response
@SkypeForBusiness commented on GitHub (Jun 6, 2025):
I have been trying to find the cause of the problem, and I think I have narrowed it down to the fact that Document Intelligence creates huge amounts of metadata. I am not sure whether this metadata is actually used in open webui or not, because from my analysis it doesn't provide any useful information for RAG, but more about document structure from OCR. Does anyone know what metadata is needed for?
@jackthgu commented on GitHub (Jun 23, 2025):
Hello,
According to your error message, it seems that under certain conditions, the metadata being passed to the vector database may need to be pruned. However, we are unable to reproduce the issue in our environment, so we currently have no way to deeply inspect the JSON data.
Would it be possible for you to provide another file where this issue occurs, so we can investigate further?
Thank you.
@SkypeForBusiness commented on GitHub (Jun 23, 2025):
Hi @jackthgu,
Thank you for taking a look at the issue. The weird things is, that for some time when first using it. There wasn't any issue, but then out of nowhere it showed up. Which is the most annoying type of bug, but hopefully we can find a solution.
Sure, here is another file: https://openwebui.com/assets/files/whitepaper.pdf
Let me know if you need any more information.
@jackthgu commented on GitHub (Jun 25, 2025):
@SkypeForBusiness Thanks for the extra details. The issue might show up again if I try it multiple times.
@SkypeForBusiness commented on GitHub (Jun 30, 2025):
@jackthgu Just wanted to check in if were able to reproduce it or not :)