By svipul
I’m using VS code for editing files on Droplet (Ubuntu) through VS code’s built in SSH function. It has been working fine, but yesterday, when I tried to SSH into the Droplet, the CPU usage was up to 100% as can been seen by the following image

and couldn’t SSH into the server. What could be possibly wrong?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
I’ve seen this happen too, sometimes the VS Code remote process starts using a lot of CPU after connecting. It’s often due to file indexing or background extensions running on the remote server.
Make sure large or unnecessary files and folders are listed in your .gitignore, otherwise VS Code will try to index everything which consumes a lot of CPU.
Also, if possible, upgrade to a slightly larger Droplet to give the VS Code server more headroom.
And avoid running heavy tasks like npm run dev directly from VS Code’s terminal, it can increase CPU load. Instead, run those commands from a separate SSH session.
Heya, @svipul
Yes, this can happen. As Bobby mentioned, try listing unnecessary files and folders in your .gitignore, other VSCode will index them and it will consume a large amount of CPU.
If the issue continues, you can either upgrade the droplet to give the server more CPU or build the code locally, push to a repository and with GitHub actions, push the code in production to your droplet.
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.