My team has been using VS Code Remote pretty successfully for the past few weeks. Our setup is a heavily modified version of this one, which uses an AWS EC2 instance as the remote server.
In order to keep costs down, each server is set to shut off after 30 minutes of inactivity (where “inactivity” is defined as “pgrep
can't detect any of the specific processes that should keep the system alive”). One of the inactivity checks is
pgrep -f .vscode-server/bin/
This works great on 4 of our 5 developer systems. Within a few minutes of the developer closing their last remote window, all server-side VS Code processes shut down, and 30 minutes later the remote server shuts down.
On the 5th, for some reason, the system never passes that inactivity test. (See the per-developer-instance CPU utilization graph below, where the green line hovers close to zero but never disappears.) ps x
shows a number of .vscode-server/bin/
processes running long after that user has disconnected their VS Code UI. I'd be happy to post some redacted process info here, but the command lines are so ludicrously long that it's hard to tell which info is relevant.
What settings or command line information can I look for to figure out what's preventing this one instance of VS Code Server from exiting gracefully after disconnect?