[Bug]: intermittent reconnection
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
OS/Web Information
- Web Browser: Chrome
- Local OS: Windows 11
- Remote OS: Ubuntu 20.04
- Remote Architecture: x86_64
code-server --version
: v4.5.1
Steps to Reproduce
- insrtall the latest version of code-server
- open an project and wating sometimes.
- open the code-server develope tool, and you can see some log like the below example
Expected
can use code-server normal.
Actual
intermittent reconnection
received socket close event (wasClean: false, code: 1006, reason: ).
Logs
No response
Screenshot/Video
No response
Does this issue happen in VS Code or GitHub Codespaces?
- I cannot reproduce this in VS Code.
- I cannot reproduce this in GitHub Codespaces.
Are you accessing code-server over HTTPS?
- I am using HTTPS.
Notes
use nginx reverse proxy code-server, and nginx configure https.
Issue Analytics
- State:
- Created a year ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
How to Fix a USB Device That Keeps Disconnecting ...
The "USB device keeps disconnecting and reconnecting Windows 10" error could be caused by faulty USB drivers. To resolve it, uninstall and ...
Read more >Why is the Internet Continuously Connecting ... - Computer Hope
If the cable modem is having trouble maintaining a steady connection, power cycling it might resolve the issue or it might be overheating....
Read more >Remote Desktop client disconnects and can't reconnect to the ...
After Remote Desktop client loses its connection to the remote desktop, the client can't immediately reconnect. The user receives one of the ...
Read more >[SOLVED] USB Keeps Disconnecting and Reconnecting ...
Solution 1: Reinstall the Universal Serial Bus Controllers Driver. A driver issue can be the reason for USB devices disconnecting and ...
Read more >USB keeps disconnecting & reconnecting in Windows 11 Fix
Your browser can't play this video. Learn more. Switch camera.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve been doing some testing and it appears that what’s causing this is a change in behavior to the websocket keep alive between 4.4.0 and 4.5.1. If I add
proxy_read_timeout 86400;
to my Nginx configuration the issue goes away. By default Nginx has a 60 second read timeout which worked just fine on 4.4.0. Below is my working configuration but we need to figure out why that’s no longer enough. I just don’t know enough about how VSCode works to try and track this down.There might be shorter values that work, like I said I’m not sure what causing the behavior change since other reverse proxies like Caddy don’t seem to do this.