{"id":2314,"date":"2026-03-31T17:51:16","date_gmt":"2026-03-31T17:51:16","guid":{"rendered":"https:\/\/veerhost.com\/docs\/fix-vps-high-cpu-usage-or-server-overloaded\/"},"modified":"2026-03-31T17:54:49","modified_gmt":"2026-03-31T17:54:49","slug":"fix-vps-high-cpu-usage-or-server-overloaded","status":"publish","type":"docs","link":"https:\/\/veerhost.com\/de\/docs\/vps\/fix-vps-high-cpu-usage-or-server-overloaded\/","title":{"rendered":"Fix: VPS High CPU Usage or Server Overloaded"},"content":{"rendered":"<p class=\"wp-block-paragraph\">If your VPS feels slow, unresponsive, or you&#8217;re getting 502\/503 errors, high CPU usage is likely the cause. Here&#8217;s how to identify the process responsible and fix it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Check Current CPU and Memory Usage<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>top<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Press <code>P<\/code> to sort by CPU usage. The top processes are the culprits. Press <code>q<\/code> to exit. For a more readable view, use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>htop<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If <code>htop<\/code> is not installed: <code>apt install htop -y<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Check System Load Average<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>uptime<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The load average shows 1, 5, and 15 minute averages. A healthy load average should be <strong>below the number of CPU cores<\/strong> on your VPS. Check your core count with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nproc<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If load average is consistently above your core count, the server is overloaded.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Identify the Problematic Process<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Find which process is using the most CPU:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ps aux --sort=-%cpu | head -10<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Common high-CPU processes and what to do:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>php-fpm \/ php:<\/strong> A WordPress plugin or script is running loops \u2014 disable recently installed plugins and check cron jobs<\/li><li><strong>mysql \/ mysqld:<\/strong> A slow or unoptimized query \u2014 check MySQL slow query log<\/li><li><strong>nginx \/ apache2:<\/strong> High traffic or a DDoS \u2014 check access logs and consider rate limiting<\/li><li><strong>python \/ node:<\/strong> A runaway script \u2014 restart or kill the process<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Kill a Runaway Process<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If a process is consuming all CPU and needs to be stopped, get its PID from <code>top<\/code> or <code>ps aux<\/code> and kill it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kill -9 PID<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace <code>PID<\/code> with the actual process ID number.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Check for Malware or Crypto Miners<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Sudden unexplained high CPU on a VPS is sometimes caused by a compromised server running a crypto miner. Look for suspicious process names like <code>xmrig<\/code>, <code>minerd<\/code>, or random strings:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ps aux | grep -i -E \"xmrig|minerd|kswapd0|kdevtmpfsi\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you find malware, the safest fix is to snapshot your data, wipe the VPS, and reinstall from a clean image.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6: Restart Overloaded Services<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Restart Nginx\nsystemctl restart nginx\n\n# Restart Apache\nsystemctl restart apache2\n\n# Restart PHP-FPM (replace 8.2 with your version)\nsystemctl restart php8.2-fpm\n\n# Restart MySQL\nsystemctl restart mysql<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Need More Resources?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If CPU is consistently maxed out under normal load, your VPS plan may need an upgrade. Contact Veerhost support at <a href=\"https:\/\/veerhost.com\/de\/support\/\">veerhost.com\/support<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>If your VPS feels slow, unresponsive, or you&#8217;re getting 502\/503 errors, high CPU usage is likely the cause. Here&#8217;s how to identify [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1967,"menu_order":10,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-2314","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs\/2314","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/comments?post=2314"}],"version-history":[{"count":1,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs\/2314\/revisions"}],"predecessor-version":[{"id":2315,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs\/2314\/revisions\/2315"}],"up":[{"embeddable":true,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs\/1967"}],"wp:attachment":[{"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/media?parent=2314"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/doc_tag?post=2314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}