mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[GH-ISSUE #15023] refac: make file upload process async (w/ polling) #17442
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 @tjbck on GitHub (Jun 16, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/15023
Originally assigned to: @tjbck on GitHub.
@kns-12 commented on GitHub (Jul 16, 2025):
@tjbck is there currently any planning on when this feature is going to be added?
And maybe a short term solution via environment variable which increases the Gateway Timeout?
@rgaricano commented on GitHub (Jul 16, 2025):
https://docs.openwebui.com/getting-started/env-configuration#aiohttp-client
& setting in reverse proxy if you use it.
@kns-12 commented on GitHub (Jul 16, 2025):
@rgaricano is that related to the 30 seconds Gateway Timeout for document Uploading/Embedding?
According to the docs, the default is already set to 300 seconds.
How would a reverse proxy tackle the internal timeout of Open WebUI?
@rgaricano commented on GitHub (Jul 16, 2025):
maybe? https://github.com/open-webui/open-webui/discussions/11345#discussioncomment-12423102
I don't know if you are using proxy to access, just a suggestion for check.
(any console log? )
@kns-12 commented on GitHub (Jul 16, 2025):
Nope, I am not using any proxy to access it.
I described my situation here: https://github.com/open-webui/open-webui/issues/15758 but it has been closed in favour of this current issue.
I am just getting a Gateway Timeout after exactly 30 seconds each time I try to upload a large file.
Concerning the Open WebUI logs, it just keeps embedding the document, after removing it from the chat due to the Gateway Timeout.
@rgaricano commented on GitHub (Jul 16, 2025):
follow on your opened thread
@avmturo commented on GitHub (Aug 1, 2025):
Marked as duplicate but my understanding is there is actually a couple of separate issues here. To yours specifically, I don't not think the timeout is coming from the OWUI server or config. I have the exact same issues, 504 gateway timeout in the file uploads, when the embedding takes more than 1minute, the POST to files from the frontend times out. For me this timeout comes from my ALB idle timeout. If it is 30 seconds for you it is coming from some other gateway/api/proxy that you have.
This issue thread should fix this by adding the polling, to keep that timeout from idling and is a general improvement. But you could fix it by increasing wherever this timeout is coming from.
I'm on mobile now but will take a proper look when I'm home this weekend.
@avmturo commented on GitHub (Aug 1, 2025):
@kns-12 - Quick Look shows GCP and Heroku have some default timeouts of 30 seconds - here is my understanding of what's going on for you:
@kns-12 commented on GitHub (Aug 5, 2025):
Hi,
it seems like the timeout happens internally in open-webui during the file upload/embedding.
The embedding still continues and finishes after the file gets removed from the chat in my case.
Also the upload to s3 as well as my own vector storage works.
I am not using GCP or Heroku and the remote server isnt timeouting either.
Having the async upload like described in this issue would resolve that most likely.
There is no possibility to extend the timeout in open-webui afaik
@rgaricano commented on GitHub (Aug 5, 2025):
openwebui env vars:
AIOHTTP_CLIENT_TIMEOUT (default 300)
AIOHTTP_CLIENT_TIMEOUT_TOOL_SERVER_DATA (default 10)
AIOHTTP_CLIENT_TIMEOUT_OPENAI_MODEL_LIST (default 10)
also I saw that is hardcoded in
b8da4a8cd8/backend/open_webui/main.py (L1695)(maybe increase it or set as total=None or 0 for unlimited &| adding also sock_connect & sock_read times params? )
@kns-12 commented on GitHub (Aug 5, 2025):
Setting the mentioned ENVs doesn't have any effect.
Think I will just wait for the refactoring. As a workaround splitting large files does work.
@decent-engineer-decent-datascientist commented on GitHub (Aug 11, 2025):
Hey friends, signing up to this thread.
@robbiekouwenberg commented on GitHub (Aug 13, 2025):
+1 for refactor. Also less hardcoded vars in general would be nice
@tjbck commented on GitHub (Aug 19, 2025):
Addressed with
5e1f4fa0ffin dev.