mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 21:09:41 -05:00
[GH-ISSUE #17452] issue: Timeout When Retrieving Large Collections from Qdrant #18293
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 @ka-admin on GitHub (Sep 15, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17452
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.6.28
Ollama Version (if applicable)
0.11.11
Operating System
Ubuntu Server 25.04 x64
Browser (if applicable)
Firefox latest
Confirmation
README.md.Expected Behavior
Open WebUI should successfully retrieve data from large Qdrant collections, either by:
Actual Behavior
The default timeout configuration in Open WebUI's Qdrant client is insufficient for handling large collections. The client timeout appears to be set to approximately 5 seconds, while queries on large collections can take dozens of seconds to complete.
Steps to Reproduce
Logs & Screenshots
Failed to fetch collection dcc05ab4-b656-4ab8-aef8-ded0dcad5ea5: timed out
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 101, in map_httpcore_exceptions
yield
File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 250, in handle_request
resp = self._pool.handle_request(req)
│ │ │ └ <Request [b'POST']>
│ │ └ <function ConnectionPool.handle_request at 0x76077dfb60c0>
│ └ <ConnectionPool [Requests: 0 active, 0 queued | Connections: 0 active, 0 idle]>
└ <httpx.HTTPTransport object at 0x76077df4c790>
File "/usr/local/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line 256, in handle_request
raise exc from None
File "/usr/local/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line 236, in handle_request
response = connection.handle_request(
│ └ <function HTTPConnection.handle_request at 0x76077dfb53a0>
└ <HTTPConnection ['http://192.168.127.20:6333', HTTP/1.1, CLOSED, Request Count: 2]>
File "/usr/local/lib/python3.11/site-packages/httpcore/_sync/connection.py", line 103, in handle_request
return self._connection.handle_request(request)
│ │ │ └ <Request [b'POST']>
│ │ └ <function HTTP11Connection.handle_request at 0x76077dfb4220>
│ └ <HTTP11Connection ['http://192.168.127.20:6333', CLOSED, Request Count: 2]>
└ <HTTPConnection ['http://192.168.127.20:6333', HTTP/1.1, CLOSED, Request Count: 2]>
File "/usr/local/lib/python3.11/site-packages/httpcore/_sync/http11.py", line 136, in handle_request
raise exc
File "/usr/local/lib/python3.11/site-packages/httpcore/_sync/http11.py", line 106, in handle_request
) = self._receive_response_headers(**kwargs)
│ │ └ {'request': <Request [b'POST']>}
│ └ <function HTTP11Connection._receive_response_headers at 0x76077dfb44a0>
└ <HTTP11Connection ['http://192.168.127.20:6333', CLOSED, Request Count: 2]>
File "/usr/local/lib/python3.11/site-packages/httpcore/_sync/http11.py", line 177, in _receive_response_headers
event = self._receive_event(timeout=timeout)
│ │ └ 5
│ └ <function HTTP11Connection._receive_event at 0x76077dfb45e0>
└ <HTTP11Connection ['http://192.168.127.20:6333', CLOSED, Request Count: 2]>
File "/usr/local/lib/python3.11/site-packages/httpcore/_sync/http11.py", line 217, in _receive_event
data = self._network_stream.read(
│ │ └ <function SyncStream.read at 0x76077df5a840>
│ └ <httpcore._backends.sync.SyncStream object at 0x7606f07a2510>
└ <HTTP11Connection ['http://192.168.127.20:6333', CLOSED, Request Count: 2]>
File "/usr/local/lib/python3.11/site-packages/httpcore/_backends/sync.py", line 126, in read
with map_exceptions(exc_map):
│ └ {<class 'TimeoutError'>: <class 'httpcore.ReadTimeout'>, <class 'OSError'>: <class 'httpcore.ReadError'>}
└ <function map_exceptions at 0x76077df59580>
File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
self.gen.throw(typ, value, traceback)
│ │ │ │ │ └ <traceback object at 0x7607080f82c0>
│ │ │ │ └ TimeoutError('timed out')
│ │ │ └ <class 'TimeoutError'>
│ │ └ <method 'throw' of 'generator' objects>
│ └ <generator object map_exceptions at 0x76070a32cb40>
└ <contextlib._GeneratorContextManager object at 0x760581d71c10>
File "/usr/local/lib/python3.11/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
└ <class 'httpcore.ReadTimeout'>
httpcore.ReadTimeout: timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/qdrant_client/http/api_client.py", line 134, in send_inner
response = self._client.send(request)
│ │ │ └ <Request('POST', 'http://192.168.127.20:6333/collections/open-webui_knowledge/points/scroll')>
│ │ └ <function Client.send at 0x76078064bf60>
│ └ <httpx.Client object at 0x76077df3f690>
└ <qdrant_client.http.api_client.ApiClient object at 0x76077df3f1d0>
File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 914, in send
response = self._send_handling_auth(
│ └ <function Client._send_handling_auth at 0x76078065c040>
└ <httpx.Client object at 0x76077df3f690>
File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 942, in _send_handling_auth
response = self._send_handling_redirects(
│ └ <function Client._send_handling_redirects at 0x76078065c0e0>
└ <httpx.Client object at 0x76077df3f690>
File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 979, in _send_handling_redirects
response = self._send_single_request(request)
│ │ └ <Request('POST', 'http://192.168.127.20:6333/collections/open-webui_knowledge/points/scroll')>
│ └ <function Client._send_single_request at 0x76078065c180>
└ <httpx.Client object at 0x76077df3f690>
File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1014, in _send_single_request
response = transport.handle_request(request)
│ │ └ <Request('POST', 'http://192.168.127.20:6333/collections/open-webui_knowledge/points/scroll')>
│ └ <function HTTPTransport.handle_request at 0x7607806496c0>
└ <httpx.HTTPTransport object at 0x76077df4c790>
File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 249, in handle_request
with map_httpcore_exceptions():
└ <function map_httpcore_exceptions at 0x7607806491c0>
File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit
self.gen.throw(typ, value, traceback)
│ │ │ │ │ └ <traceback object at 0x760581d70c00>
│ │ │ │ └ ReadTimeout(TimeoutError('timed out'))
│ │ │ └ <class 'httpcore.ReadTimeout'>
│ │ └ <method 'throw' of 'generator' objects>
│ └ <generator object map_httpcore_exceptions at 0x76070a32d140>
└ <contextlib._GeneratorContextManager object at 0x7605914be1d0>
File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 118, in map_httpcore_exceptions
raise mapped_exc(message) from exc
│ └ 'timed out'
└ <class 'httpx.ReadTimeout'>
httpx.ReadTimeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
self._bootstrap_inner()
│ └ <function Thread._bootstrap_inner at 0x7607f25ac9a0>
└ <Thread(ThreadPoolExecutor-6_0, started 129769902986944)>
File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
│ └ <function Thread.run at 0x7607f25ac680>
└ <Thread(ThreadPoolExecutor-6_0, started 129769902986944)>
File "/usr/local/lib/python3.11/threading.py", line 982, in run
self._target(*self._args, **self._kwargs)
│ │ │ │ │ └ {}
│ │ │ │ └ <Thread(ThreadPoolExecutor-6_0, started 129769902986944)>
│ │ │ └ (<weakref at 0x7606595f6840; to 'ThreadPoolExecutor' at 0x76059ba20e10>, <_queue.SimpleQueue object at 0x76070a98ff60>, None,...
│ │ └ <Thread(ThreadPoolExecutor-6_0, started 129769902986944)>
│ └ <function _worker at 0x7607f16889a0>
└ <Thread(ThreadPoolExecutor-6_0, started 129769902986944)>
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker
work_item.run()
│ └ <function _WorkItem.run at 0x7607f1688ae0>
└ <concurrent.futures.thread._WorkItem object at 0x760581d70650>
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
│ │ │ │ │ └ {}
│ │ │ │ └ <concurrent.futures.thread._WorkItem object at 0x760581d70650>
│ │ │ └ ()
│ │ └ <concurrent.futures.thread._WorkItem object at 0x760581d70650>
│ └ <function chat_completion_files_handler.. at 0x76070aad9da0>
└ <concurrent.futures.thread._WorkItem object at 0x760581d70650>
File "/app/backend/open_webui/utils/middleware.py", line 683, in
lambda: get_sources_from_items(
└ <function get_sources_from_items at 0x76077b92c180>
File "/app/backend/open_webui/retrieval/utils.py", line 643, in get_sources_from_items
query_result = query_collection_with_hybrid_search(
└ <function query_collection_with_hybrid_search at 0x76077baeff60>
File "/app/backend/open_webui/retrieval/vector/dbs/qdrant_multitenancy.py", line 314, in get
points = self.client.scroll(
│ │ └ <function QdrantClient.scroll at 0x76077e0a8180>
│ └ <qdrant_client.qdrant_client.QdrantClient object at 0x76077f9a4c90>
└ <open_webui.retrieval.vector.dbs.qdrant_multitenancy.QdrantClient object at 0x76077f98e410>
File "/usr/local/lib/python3.11/site-packages/qdrant_client/qdrant_client.py", line 1459, in scroll
return self._client.scroll(
│ │ └ <function QdrantRemote.scroll at 0x76077e0a5260>
│ └ <qdrant_client.qdrant_remote.QdrantRemote object at 0x76077df3ee50>
└ <qdrant_client.qdrant_client.QdrantClient object at 0x76077f9a4c90>
File "/usr/local/lib/python3.11/site-packages/qdrant_client/qdrant_remote.py", line 1719, in scroll
self.openapi_client.points_api.scroll_points(
│ │ │ └ <function SyncPointsApi.scroll_points at 0x76077e6a1620>
│ │ └ <qdrant_client.http.api.points_api.SyncPointsApi object at 0x76077df4ced0>
│ └ <qdrant_client.http.api_client.SyncApis object at 0x76077df3f810>
└ <qdrant_client.qdrant_remote.QdrantRemote object at 0x76077df3ee50>
File "/usr/local/lib/python3.11/site-packages/qdrant_client/http/api/points_api.py", line 936, in scroll_points
return self._build_for_scroll_points(
│ └ <function _PointsApi._build_for_scroll_points at 0x76077e6a0400>
└ <qdrant_client.http.api.points_api.SyncPointsApi object at 0x76077df4ced0>
File "/usr/local/lib/python3.11/site-packages/qdrant_client/http/api/points_api.py", line 410, in build_for_scroll_points
return self.api_client.request(
│ │ └ <function ApiClient.request at 0x76077e6b3240>
│ └ <qdrant_client.http.api_client.ApiClient object at 0x76077df3f1d0>
└ <qdrant_client.http.api.points_api.SyncPointsApi object at 0x76077df4ced0>
File "/usr/local/lib/python3.11/site-packages/qdrant_client/http/api_client.py", line 95, in request
return self.send(request, type)
│ │ │ └ <class 'qdrant_client.http.models.models.InlineResponse20016'>
│ │ └ <Request('POST', 'http://192.168.127.20:6333/collections/open-webui_knowledge/points/scroll')>
│ └ <function ApiClient.send at 0x76077e6b3560>
└ <qdrant_client.http.api_client.ApiClient object at 0x76077df3f1d0>
File "/usr/local/lib/python3.11/site-packages/qdrant_client/http/api_client.py", line 112, in send
response = self.middleware(request, self.send_inner)
│ │ │ │ └ <function ApiClient.send_inner at 0x76077e6b3600>
│ │ │ └ <qdrant_client.http.api_client.ApiClient object at 0x76077df3f1d0>
│ │ └ <Request('POST', 'http://192.168.127.20:6333/collections/open-webui_knowledge/points/scroll')>
│ └ <qdrant_client.http.api_client.BaseMiddleware object at 0x76077df3f190>
└ <qdrant_client.http.api_client.ApiClient object at 0x76077df3f1d0>
File "/usr/local/lib/python3.11/site-packages/qdrant_client/http/api_client.py", line 250, in call
return call_next(request)
│ └ <Request('POST', 'http://192.168.127.20:6333/collections/open-webui_knowledge/points/scroll')>
└ <bound method ApiClient.send_inner of <qdrant_client.http.api_client.ApiClient object at 0x76077df3f1d0>>
File "/usr/local/lib/python3.11/site-packages/qdrant_client/http/api_client.py", line 136, in send_inner
raise ResponseHandlingException(e)
└ <class 'qdrant_client.http.exceptions.ResponseHandlingException'>
qdrant_client.http.exceptions.ResponseHandlingException: timed out
Additional Information
Environment:
Problem:
When querying collections containing large numbers of documents (~40k), Open WebUI experiences timeout exceptions while attempting to retrieve data from Qdrant. The Qdrant server itself is operational and eventually returns results when queried directly (via browser takes dozens of seconds), but the Open WebUI client fails with httpx.ReadTimeout and ResponseHandlingException.
@Classic298 commented on GitHub (Sep 15, 2025):
what's your aiohttp timeout set to?
@ka-admin commented on GitHub (Sep 15, 2025):
Where can I find it? I didn't change any timeouts in Open WebUI / qdrant or browser, so I guess the value is default.
@ka-admin commented on GitHub (Sep 15, 2025):
OK, looks like I got it. Added this https://docs.openwebui.com/getting-started/env-configuration/#qdrant_timeout to docker run command and everything fine now.
thanks and sorry for bothering.
Documents retreived fine but in logs I see this (Don't know maybe could be useful for some other case investigation):