Question
How can I find out why my CPU Is spiking to 100%?
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.
×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
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.
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’m facing the same problem with a 512MB droplet. This is what I get: http://imgur.com/MPBepxY
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 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”.
I get spikes of 80% with 3 wordpress sites with very low traffic. Site was installed with serverpilot & I believe swap is enabled