mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
issue: stale socket-connections in state CLOSE-WAIT when run with docker and nginx reverse-proxy #5688
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 @mx-tc on GitHub (Jul 2, 2025).
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.15
Ollama Version (if applicable)
0.9.2
Operating System
Linux Mint 22.1
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Normal usage of AI-chat for multiple users should work reliable.
Actual Behavior
AI-chat works as expected just after fresh start of the open-webui docker-container, but after some time the system stops working; ~ 2 hours of concurrent usage by ~3 users.
After some investigation I observed an increased amount of open sockets in state CLOSE-WAIT owned by open-webui.
ATTENTION: using tools like
ssornetstaton the host won't list those sockets, as they are scoped into docker-containers own network-namespace; to observe sockets use as root-user something like:This results in something like
Also there are many
curlandjqprocesses that can be seen withps aux, propably originating from stuck docker HEALTHCHECKSteps to Reproduce
Note: Not sure if it is precisely reproducable, following description only show the setup in which I observed it.
curl -fsSL https://ollama.com/install.sh | sh)docker-compose.ymland NGINX reverse-proxy-configurationdocker compose up -dLogs & Screenshots
Attached screenshot show Prometheus / Grafana metrics showing high allocated socket count:
Additional Information
The setup used nearly fits the scheme Ollama on Host, Open WebUI in Container (Linux) from official documentation.
Additionally a reverse-proxy started as docker-container is configured in front of it for HTTPS-termination.
NOTE: the community-provided configuration HTTPS using Nginx wasn't sufficient and had to be supplemented with directives to allow for web-sockets being passed thru the reverse-proxy.
The whole stack is started using docker-compose.
docker-compose.yamlnginx.conf:@mx-tc commented on GitHub (Jul 3, 2025):
To further refine how we use AI-chat in case it matters:
https://ai-server.intranet/ollama/@expilu commented on GitHub (Jul 3, 2025):
I'm having a similar problem with v0.6.15. With a similar set up using open webui as "proxy" for the ollama api for the Continue plugin.
It works for a while after restart, but then it stops working and the container is unhealthy.
In my case I have a traefik in front instead of nginx.
@rgaricano commented on GitHub (Jul 3, 2025):
Related & addresed: https://github.com/open-webui/open-webui/issues/14945
@BAngelis commented on GitHub (Jul 7, 2025):
I'm having a very similar problem with v0.6.15. One user, 10 - 20 prompts, stops responding. Used both Caddy and nginx reverse proxys, similar behavior from the user's perspective.
@AlexanderZhk commented on GitHub (Oct 7, 2025):
+1
Same setup here, nginx as reverse proxy for https termination.
At point 1 OWUI became unresponsive, at point 2 we implemented restart on unhealthy, but the issue persists:
relevant nginx.conf:
We're running with postgres and redis. OWUI v0.6.32
@unixshaman commented on GitHub (Oct 13, 2025):
I think I've encountered the same issue. The OWUI version was v0.6.32, but then I updated to OWUI v0.6.33, and it's unclear whether it was an external influence or a version bug—but now it seems to be working.
@rgaricano commented on GitHub (Oct 13, 2025):
user & or session opened? in what conditions happend the peak? starting? with some specific request?
it seem a race condition of all clients trying to refresh its connections or massive requests (e.g. by the issued retrieving logic)
@AlexanderZhk commented on GitHub (Oct 13, 2025):
In my case it was unclear, OWUI logs had nothing useful, but I didn't try changing log levels (this deployment, where the issue happened, can see ~200 real users peaks, uncontrolled environment). It's hard to reproduce, seems to happen sporadically for me. My wild guess is some clients' browser could be not closing websockets properly.
Wasn't able to narrow down or reproduce with sub ~25 users in a controlled environment.
Can you go into massive requests (e.g. by the issued retrieving logic) into more detail? We have RAG enabled, so multiple users using or indexing RAG is entirely possible. (No custom filters or pipes)
@rgaricano commented on GitHub (Oct 13, 2025):
https://github.com/open-webui/open-webui/issues/18133
@Daikku commented on GitHub (Oct 22, 2025):
+1
same problem
@nikita-makarevich commented on GitHub (Oct 27, 2025):
I have the same problem, I'm really looking forward to a solution