microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.55k stars 263 forks source link

Extension exhausts remote RAM #9996

Open Dilrevx opened 2 weeks ago

Dilrevx commented 2 weeks ago

Same issue as #9821 . I run vscode for merely 2 hours and it consumes all swap space.

### Tasks
mliudev commented 1 week ago

I also have the same issue. I notice in the devcontainers container log I get a large number of these messages. Since I use docker desktop for Mac I see that my CPU usage spikes to 600% (6 CPUs allotted) and ram to the maximum allocated as well (~8 gigs). This will sometimes also crash the docker engine and I have to force quit the docker engine in activity monitor and restart.

These messages fill the entire dev container container log:

[1992 ms] Port forwarding connection from 54779 > 54767 > 58335 in the container.
[1993 ms] Start: Run in container: /home/node/.vscode-server/bin/5437499feb04f7a586f677b155b039bc2b3669eb/node -e 
[1993 ms] Port forwarding connection from 54780 > 54767 > 58335 in the container.
[1993 ms] Start: Run in container: /home/node/.vscode-server/bin/5437499feb04f7a586f677b155b039bc2b3669eb/node -e 

devcontainer.json

{
    "name": "Node.js & TypeScript",
    // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
    "image": "mcr.microsoft.com/devcontainers/typescript-node:20",
    "runArgs": ["--network=host"],
    "customizations": {
        "vscode": {
            "extensions": [
                "esbenp.prettier-vscode",
                "dbaeumer.vscode-eslint",
                "ionutvmi.path-autocomplete",
                "github.vscode-github-actions",
                "sysoev.vscode-open-in-github",
                "ms-azuretools.vscode-docker",
                "clinyong.vscode-css-modules"
            ],
            "settings": {
                "typescript.tsdk": "node_modules/typescript/lib",
                "typescript.enablePromptUseWorkspaceTsdk": true,
                "[scss]": {
                    "editor.defaultFormatter": "esbenp.prettier-vscode"
                },
                "remote.localPortHost": "allInterfaces",
                "cssModules.pathAlias": {
                    "@/common": "${workspaceFolder}/src/common",
                    "@/app": "${workspaceFolder}/src/app"
                },
                "search.exclude": {
                    "**/.git": true,
                    "**/.svn": true,
                    "**/.hg": true,
                    "**/CVS": true,
                    "**/.DS_Store": true,
                    "**/Thumbs.db": true,
                    ".next": true,
                    "node_modules": true
                }
            }
        }
    },
    "features": {
        "ghcr.io/devcontainers-contrib/features/firebase-cli:2": {}
    }
}
mliudev commented 1 week ago

Curious but why was #9821 closed? It very closely resembles my issues.

Dilrevx commented 1 week ago

Also curious about why #9821 was closed. I opened this issue only for further discussion on #9821.

roblourens commented 1 week ago

@Dilrevx are you also using Dev Containers or another remote extension?

Would be helpful if you can check which processes are using high CPU and memory using px

mliudev commented 1 week ago

For me it's the same as in this picture: https://github.com/microsoft/vscode-remote-release/issues/9821#issuecomment-2155563491.

Also I'm using devcontainers and it happens when using the Devcontainers: rebuild container command in VSCode command palette action.