I set up a basic Node.js app on a 1GB Droplet (Ubuntu 22.04). The app is running fine but when I check top or the DigitalOcean monitoring graphs, CPU is sitting at 40-60% even when there are zero active users.
I checked my app logs and nothing unusual is happening. No cron jobs running either. I am not sure if this is a DigitalOcean issue or something with my setup.
Is this normal? What should I even be looking for?
Thanks
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,
This is almost never a DigitalOcean issue, and it is actually a pretty common thing to run into on fresh Droplets. A few things to check:
To find what is actually eating CPU run:
top -o %CPU
Sort by CPU and watch for a few seconds. If it is not your Node process, it is likely one of these culprits:
unattended-upgrades running in the background on a fresh Ubuntu installsystemd-journald doing log cleanupnode itself leaking memory and triggering garbage collection constantlyFor Node specifically, idle CPU spikes usually mean one of two things: a setInterval or background task you forgot about, or a memory leak forcing frequent GC cycles. Run this and watch memory over a few minutes:
watch -n 2 'ps aux --sort=-%mem | head -5'
Also check for crypto miners. Compromised Droplets are a real thing, especially if you left a port open or used a weak password. Look for unfamiliar process names in top.
If you share what process is showing high CPU in top, easier to point you in the right direction.
Heya, @9e483d26583f44f6bafe369a29b405
Not normal, but pretty easy to track down. The monitoring graphs show you that it’s high but top will show you what’s causing it.
Run top and press P to sort by CPU - whatever’s at the top is your culprit. If it’s your Node process, run top -H -p $(pgrep node) to see which thread is spinning.
A few common causes for idle Node apps eating CPU:
Polling loops or setInterval running too frequently, AI/LLM related stuff (you tagged AI Agents) doing background processing or keeping connections warm, a dependency doing something unexpected like a file watcher, or PM2/monitoring agent overhead if you’re running those.
Also worth checking htop if installed - gives a cleaner per-process view. And ps aux --sort=-%cpu | head for a quick snapshot.
What does the top process show when you run it?
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.
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.