mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[GH-ISSUE #20890] issue: WebUI stalls sending 'completions' requests when switching to another browser tab #139050
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 @fnf on GitHub (Jan 23, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20890
Check Existing Issues
Installation Method
Pip Install
Open WebUI Version
0.7.2
Ollama Version (if applicable)
No response
Operating System
Windows 11
Browser (if applicable)
Firefox, Chrome, Edge, Opera (all latest versions)
Confirmation
README.md.Expected Behavior
Some prompts are expected to take a long time for the LLM to process, what I'd normally do is I send a prompt (by pressing Ctrl-Enter or clicking the 'Send message' button in the WebUI): I'd immediately switch to another tab to do something else whilst waiting for the prompt to come back.
I'd expect the prompt (specifically the POST 'completions' request) to be sent to the server, regardless of whether the browser tab is visible/active, or is in the background.
Actual Behavior
The prompt is never sent unless I switch back to the WebUI tab.
Steps to Reproduce
This issue has been reproduced in both Open WebUI pip installation, as well as Docker installation (inside WSL2 on Arch Linux, on Windows 11).
This has also been reproduced in multiple main-stream browsers: Firefox, Chrome, Edge and Opera.
I've also fiddled with browser settings related to power/CPU load management, as well as some extensions to force browser tabs being active even when they're switched to the background (such as Always Active Window on Firefox and Chrome/Edge).
I've also analysed the Network activity and could confirm that it was the WebUI that stalls sending the POST 'completions' requests, and not the WebUI server or the LLM server.
The steps to reproduce are as follows:
Logs & Screenshots
This could be a little hard to see, but this screenshot shows the moment I sent the message:

After that, I switched to another browser tab for about 20 seconds then switched back. This screenshot shows that the completions POST request was only sent by that point:
The prompt would be stalled indefinitely as long as I don't switch back to the WebUI tab.
Additional Information
My workaround for this issue is to remain in the WebUI browser tab for at least 10 seconds after sending the prompt, because we can't see when the
completionsmessage is POST'ed by the client unless we analyse the network traffic.@owui-terminator[bot] commented on GitHub (Jan 23, 2026):
🔍 Similar Issues Found
I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:
#20196 Open WebUI hangs streaming when pipe returns AsyncGenerator (UI stuck “executing”)
by dhaern • Dec 27, 2025 •
bug#20502 issue: Performance Optimization: How can open-webui support high availability and high concurrency?
by gongshaojie12 • Jan 09, 2026 •
bug#20327 issue: Unable to use any Open WebUI version newer than 0.6.25 due to hybrid search performance
by galvanoid • Jan 02, 2026 •
bug#16143 issue: Open-WebUI stopped opening all of a sudden
by venki-lfc • Jul 30, 2025 •
bug💡 Tips:
This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
@Classic298 commented on GitHub (Feb 6, 2026):
tested on Brave, cannot reproduce
@Classic298 commented on GitHub (Feb 6, 2026):
i sent hello to a model in a fresh conversation and INSTANTLY switched away with CTRL+TAB
then waited 10 sec and returned and the completion was already done and network looked normal to me
@fnf commented on GitHub (Feb 7, 2026):
@Classic298 Thanks for having look.
I found out that the delay was actually caused by the Location update step, which blocked
completionsrequest. It was not thecompletionsrequest that took a long time to get POSTed.When I used my normal account, it again about 7 seconds for the
updatestep to take place, followed quickly by thecompletionsrequest:Once
Allow User Locationwas disabled, the latency became minimal again :) . I'll change the title of this ticket.@fnf commented on GitHub (Feb 7, 2026):
Actually, I'd like to keep the title as-it, because even if location update takes a long time, it shouldn't cause
completionsto completely stall. Would it be possible for you to try enablingAllow User Locationto see if it's reproducible?.I don't actually need this feature, but it might have uncovered an issue here.
@Classic298 commented on GitHub (Feb 7, 2026):
Are you sure this is not a browser limitation?
From a security perspective it seems... bad to allow not-focused browser tabs to request your location.
So to me it would make sense that the location update is stalled while the tab is not focused. And since the chat completion in your case depends on the location being fetched,... anyways let me research if my assumptions here are correct or not
@Classic298 commented on GitHub (Feb 7, 2026):
Ok i did some research.
Modern browsers indeed block geolocation updates (and many other things) when a browser tab is not in focus, for two main reasons
So if you are using the User Location feature to send your location to the model - you will need to keep the browser tab focused until the location is determined.
How else is Open WebUI supposed to handle it in these cases?
You want to use the location feature to send the location to the model - so Open WebUI has to query your location prior to sending off the prompt to the model - but you switched tabs and now the API does not let the out-of-focus tab query the location anymore - and no location = no prompt gets sent off.
@fnf commented on GitHub (Feb 7, 2026):
Yes, it wasn't immediately apparent what the
updaterequest did until I looked at the response. Once I knew it was location update it made sense why there was such a long delay.Before this, I spent a fair amount of time checking and configuring both Firefox and Chrome to disallow tabs going to sleep. Also tried several addons to keep browser tabs alive (as mentioned in the description). The assumption was that background tabs were performance-throttled.
I think it would probably have been fine for background tabs to query locations within the time it was allowed to be active (Firefox's default is 1 minute). Anyway, this is a browser's policy and not an issue with Open WebUI itself.
I've been fighting this issue for quite a while so happy that it's now working :) .