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.×
A question can only have one accepted answer. Are you sure you want to replace the current answer with this one?
You previously marked this answer as accepted. Are you sure you want to unaccept it?
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:
I have a similar situation, running Virtualmin + Wordpress on a 512mb Ubuntu 14 droplet. Suddenly the site became unresponsive while testing out a new e-mail notification system, turns out CPU was through the roof on the real-time chart.
Does anyone have any clue as to which logs to look at for more info?
Hi all, I have just had this happen to one of my droplets (CentOS7). Suddenly my SSH was terminated and I couldn’t log back in.
Had to do a graceful/forced reboot to re-gain access..
The server is only there to hold backup files so im slightly worried that the droplet is not reliable. :-/
I am facing the same issue. I am running the Django framework on droplet with 2 GB Memory / 40 GB Disk / SGP1 - Ubuntu 14.04.3 x64. API’s are implemented and using ORM Mysql query to send the response. Even when 10 user uses the App, CPU load goes more then 100% and I can’t access the droplet until I reset the password from digital ocean online account.
Same issue ,CPU keeps maxing out!!
I have one apache server with 5 WP sites, this was running fine but I had an ubuntu server with 1 site that kept crashing out. Having researched I came to the conclusion it was ubuntu, so I moved the site onto the Apache one which had been fine for 2 weeks.
Now.. All of a sudden its doing it again even when I disable sites to try diagnose which one’s causing the problem the CPU just keeps maxing, longest I can keep it going is a few min before having to power cycle.
Will have to abandon DO at this rate
Anyone find a solution to this with a WP install. I have a WP site with no traffic or DNS even pointing to the site, doesnt matter if I use WP default 2016 theme or an optimized custom theme, after a day or two it just spikes to 100% and I have to reboot it. I installed via server pilot and have about 10 other accounts that work fine, this one I have recreated the droplet 3 times and still see this issue, its like its only on this account?
My droplet (512MB, 20GB) experienced the same issue. I manage to find the process ‘update-apt-xapi’ was causing the high usage. The solution in my case was to alter the priority of the cron config. Solution #1 on this site Ubuntu : update-apt-xapi takes lot of cpu usage.
Hope that helps someone
Even though the thread is already pretty old, I got the same problem. So far I have nothing special running on my machine and I already resized it to the second lowest droplet but the cpu load for “user” is up to 100% as you can see on the picture. https://cl.ly/431Z3b0X3N0K
Anyone any idea why this is happening?
Even htop shows that there is nothing significant going on but the cpu is still on 100%.
Ok guys, I had the same cpu issue I solved but I am not sure if my situation is the same as yours.
I had a WordPress site with a weak password that site has been infected with a trojan horse. I cleaned it up but after that my cpu is almost 100% but I could still log in my ssh, I used top command line as @kamaln7 said I found a process that take more than 98% of the cpu usage it was with strange name like phpCDKJVG_vclmz I killed it using kill -KILL (PID). and everything back to normal again.
I hope that may help any of you.
I have the same problem. My config is 2GB ram 2 cores 30Gb space. 600%over cpu in the graph. But Digital Ocean don’t have answers. They say It’s a config problem, but 4 reboots in one week is a lot. My clients are very angry.
I fix a little my apache conf and mysql conf but.. that not the problem.
Seems like a lot of people are coming across this issue, I myself am facing it. I upgraded from $5 to $20 and still have the same issue but the server 99% of the time runs at like 2-3% see image here: http://prntscr.com/ovusw2
I am hosting one small wordpress website on plesk.
Any help I would be grateful.
Same here, I use Standard / 4 GB / 2 vCPUs and still 100%. I found that the MySQL server is using most of it. With TOP command, it said that CPU Usage 200%, I have try so many different configurations, and still get above 100%.
Has that happened because it shared CPU ?? Standard droplet use shared CPU.
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
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
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