-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vscode-server
remote SSH memory leak
#9778
Comments
I encounter this as well. Closing an editor (connected to |
Yes, same issue for me. An ever increasing number of vscode-server processes consuming an ever increasing amount of memory until the inevitable happens. One issue is that starting a remote-SSH session then using the command "Remote-SHH: Kill VSCode Server On Host..." does not kill all of the vscode processes that have been started. The only way I found to do that was find the parent process of a vestigial vscode process (which will be a "bash" command), kill that process and then kill any remaining vscode-server processes using something like pkill -f vscode-server. There really needs to be a way to make a remote SSH connection and then to close it down again without this messy stuff. Or is there one that I am missing? |
Can you share the full command line arguments of the processes that appear to be leaked? If the vscode window exits cleanly, its associated processes should be shut down on the remote (except for the server process which is lives a little longer and is shared with other connected windows) |
Sure. I have taken some time to look at this more carefully as it is hard to see the wood for the trees, and as you say some processes live a little longer than others. In summary what seems to be happening is that every time I close a vscode window, after making sure I close the remote-ssh session first (I am assuming this is the cleanest way to exit) I am left with a set of node processes. When I open a new remote-ssh session some of these processes get replaced with new ones and when I close down again some remain. But what seems odd is that one node process never gets removed or replaced, just recreated every time. This is the "fileWatcher" process. This process, and its 11 threads, gets created for each new VSCode remote-ssh session and after existing cleanly remains. On starting a new VSCode remote-ssh a new "fileWatcher" process and a further 11 threads get created. And so on and so on each time I close and start anew. I have full details in the attached file in case that helps. |
I encountered the same issue using VS Code version 1.88.1 and Remote SSH version 0.110.1. When I close the remote connection in VS Code and then close the VS Code window, the fileWatcher process on the remote server does not stop. Upon reopening VS Code and establishing a remote SSH connection again, a new fileWatcher process is created on the server, resulting in two fileWatcher processes. After repeating this process multiple times, file handles are depleted, and VS Code displays the message 'Visual Studio Code is unable to watch for file changes in this large workspace' (error ENOSPC). I found a similar issue in the VS Code repository, where it was mentioned that the problem was fixed in VS Code release 1.70. However, I am still encountering this issue in the latest stable version. Is this a problem with VS Code itself or with the Remote SSH plugin? |
@bpasero ? |
Sounds a lot like microsoft/vscode#211462, needs investigation. |
Same issue here... From what i found it had something to do with filewatcher, but i havent looked into it thaat much. The cpu usage is not the main issue for me, but the ram usage, it climbs about +1GB per minute to eventually freeze the system to a extent where oom dosent even kick in. I also found that closing a window or not dosent matter, running a vscode ssh connection makes the cpu spike, and then no matter f you leave it open, close the connection, close the wndow etc, it will leak HUGE amounts of memory. Yesterday it went up to 32GB ram usage in 10mins |
I'm going to merge it into microsoft/vscode#211462, there's some more detail there |
Hi guys
I've got several different remote SSH folders pinned to VS Code in my task bar. They're all on the same host. I'm experiencing the following issues:
vscode-server
instance seems to be launched on the host, which results in very high memory usage.So after opening and closing the same remote folders a few times, the remote host runs out of memory and needs a reboot. This screenshot is from the remote host. No VS Code IDE windows are open but
vscode-server
is using 8GB RAM.This screenshot was after opening and closing the same 5 remote SSH folders 3-4 times:
The text was updated successfully, but these errors were encountered: