Report this

What is the reason for this report?

How do I troubleshoot high CPU or memory usage on my Droplet?

Posted on October 10, 2025

How do I troubleshoot high CPU or memory usage on my Droplet?



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.

Heya,

Use commands like top or htop # if installed, more user-friendly These show which processes are consuming the most CPU and memory. Look for any process stuck at 90–100% or using excessive RAM.

Enable DigitalOcean Monitoring & Metrics In your Droplet dashboard, enable Monitoring. This provides CPU %, memory, disk I/O, and alerts right from the dashboard. If you notice spikes, match the timeline with deployments, traffic bursts, or cron jobs.

Investigate the Culprit Web servers (Nginx/Apache): Too many requests or misconfiguration.

Databases (MySQL/PostgreSQL): Slow queries, missing indexes, too many connections.

Background tasks or cron jobs: Scripts running in loops or with memory leaks.

Bots or DDoS traffic: Check access logs for unusual IPs or repetitive requests.

Check System Logs

/var/log/syslog
/var/log/auth.log
/var/log/nginx/access.log
/var/log/mysql/error.log

Errors, crashes, or authentication attacks may consume resources.

Optimize Services

  • MySQL: Tune with mysqltuner or optimize queries.

  • PHP / Node / Django apps: Use proper process managers (PM2, Gunicorn, Supervisor).

  • Caching: Add Redis or enable page caching to reduce load.

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.