Report this

What is the reason for this report?

CPU up to 100% when SSH into Droplet (Ubuntu) under VS Code

Posted on October 14, 2025

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

image alt text
image caption

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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.