Question

How can I find out why my CPU Is spiking to 100%?

  • Posted January 28, 2014

I have one droplet that has 7 WordPress installs on it. Most sites get very little traffic so resources are not an issue.

However, every so often the CPU spikes to 100% and stays there. The only thing I can do is log into the website and power cycle the machine.

https://cloudup.com/cXgNTHGW6cT

How can I find out what’s causing this?

Subscribe
Share

I too had this problem (with smallest droplet 0.5 GB RAM + ISPConfig 3), So I tried digging into the problem, I used “htop” to monitor the process that was eating the CPU out, I saw "amavisd " was the only culprit.

So I searched the interwebs and found similar problem being reported so I disabled the “amavisd” By this command “systemctl enable amavisd.service” and commenting out the “Example” line inside the fiel “/etc/freshclam.conf”.

same issue. it’s 2022 now. i’m thinking it could be a DoS attack.

This comment has been deleted

I get spikes of 80% with 3 wordpress sites with very low traffic. Site was installed with serverpilot & I believe swap is enabled

i am facing the same problem twice. First I thought it was problem with my script but its working fine on another server. No way to detect why this is happening.

I’m facing the same problem with a 512MB droplet. This is what I get: http://imgur.com/MPBepxY

It’s reassuring I’m not the only one with this ongoing issue. I have a single WP install on a 512mb Ubuntu droplet. I get random 50–100% CPU spikes, sometimes twice a day, once in awhile never. This cripples logging in via ssh, or visiting its http address. No pattern found in the error and slow logs. Can’t tell if it’s DigitalOcean, ServerPilot, or a plugin.

When debugging WP, there are no errors. I have WP Super Cache dump its cache every midnight, NOT when a post/page has been updated. There are no other scheduled processes performing like external backups—I haven’t been able to get that far.

I have the same problem with a tiny apache2 in my droplet.

I have just a simple apache2 and I am building a PHP webapp. I have seen this happend to me twice already while in VI in last 3 months. We should be atleast able to know why such things in droplets.


Submit an 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.

I believe that all of those reports of “out of memory” are related to lack of virtual memory. Digital Ocean droplets don’t come with swap partitions enabled by default, so the kernel just kill the process when it’s not possible to allocate more RAM for it

I had problems with a long-running Java process I developed and the solution was pretty simple.

Check the links below to enable it on Ubuntu or CentOS:

https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04

https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-centos-7

Woo for the necro-posting.

I had this issue on one droplet a few months ago; I scaled up the droplet and hacked the MySQL config to pieces just to get the site working. Running another droplet, this time hosting multiple sites on it (all the same company) and constant disconnects.

Constantly breaking tables. I’m not even sure it is to do with the plugins/themes like I first thought.

It seems to be a running thing with DO droplets lately, as another client has had issues a few weeks back. And there is the whole “blanket blacklist DO IPs” too.

I have also the same issue. CPU cross 100% even if I open my site pages in mobile for viewing. mean I am only the user at that time on my site. still it. I have two magento 2 sites with 50 GB Space, 2 GB RAM and 2 GB Bandwidth. what should I do. each site hs only 70 to 150 products only

I am having the same issue. For no apparent reason CPU Usage, Disk I/O have spikes and I am only running one simple Drupal site.

I install Ubuntu WordPress on 18.04 on droplet and My droplet CPU is showing to 96% used and my website is breaking and I have low web traffic so what I do next? https://imgur.com/a/C78kcBB

I was facing similar issue of 100% CPU use. It was happening on a server where only Redis is installed apart form the Ubuntu OS. The issue started when i open the redis for all ports. which is updating the bind to 0.0.0.0. I had to do so because specific ip binding was not working. I was searching the solution for last few days. While the process goes high one process named kdevtmpfsi was using the full computation power.

then i updated the redis via ppa and edited the config once again,

nano /etc/redis/redis.conf

bind localhost 10.133.14.9

Here 10.133.14.9 is the private IP of the redis server.

You can follow the guide to install the Redis from here: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-redis-server-as-a-session-handler-for-php-on-ubuntu-14-04

It’s December 2019. Please DO say something. Open your mouth. A newborn baby can say everything after 5 years but DO guys till now zipped?

we are getting same issue ,we are using $40 server with only 1 site…30-40 real time only and using memcache and CDN still we are getting this issue since last 3 -4 days …generated ticket but no reply.waiting for solution else will needs to think to move on other’s.

Why the support is not replaying to this issues? I had a site hosted on DO for 4 years now, never had any significant problems. A now this happens CPU spiked at 100% and I can’t do anything. The support is not answering tickets.

?

A four year old post, 30k views and no input from DO, if these issues don’t get resolved im moving everything to vultr.