Websockets Do Not Close When Behind Nginx
n1xxk opened this issue · 1 comments
n1xxk commented
Notes
This is behind Nginx.
Expected Behavior
Websockets should close after the user ends their proxy session or closes their tab.
Current Behavior
The Websockets stay open resulting in very high Nginx CPU usage and also UV CPU usage.
Steps to Reproduce
- Make a websocket connecting through the proxy.
- Close it on the user side.
- UV is still connected to the remote server.
Context (Environment)
This makes my server very slow and shows 99% of UV CPU usage when it is doing nothing
Detailed Description
Please make a change when the user closes the WS UV also closes it on the server side.
n1xxk commented
I think I have fixed it now, I added proxy_socket_keepalive to the Nginx config.