Body: <p>so We're having 100 % CPU usage (memory usage is quite normal, load average is high more than 5 or 6) on my Craft 2 production since a few days now. I thought it's a background task but nopes. Thanks to the cache which is serving most public pages well and fast but the Craft admin dashboard is all clogged up, giving 502 Bad Gateway. Basically anything which requires code processing/compile isn't running. We're running Craft on a 4 vCPU and 8GB RAM.</p>
  <p><strong>This is when the things started getting bad :</strong></p>
  <p><a href="https://i.sstatic.net/6WZUF.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/6WZUF.jpg" alt="100 percent usage" /></a></p>
  <p><strong>We're now having 100 percent CPU usage since then :</strong></p>
  <p><a href="https://i.sstatic.net/ycN2z.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ycN2z.jpg" alt="100 percent usage" /></a></p>
  <p><strong>Tasks on ubuntu</strong></p>
  <p><a href="https://i.sstatic.net/MtLKg.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/MtLKg.png" alt="tasks on ubuntu" /></a></p>
  <p><strong>Things we've checked :</strong></p>
  <ol>
  <li>Checked Task manager in Dashboard</li>
  <li>Restarted nginx</li>
  <li>Restarted PHP</li>
  <li>Restarted whole server (droplet - Digital Ocean)</li>
  <li>Checked craft_tasks table to see if background tasks running. It's empty.</li>
  <li>Checked PHP and Craft logs - seems fine</li>
  <li>Checked Google Analytics to see if any clue of Ddos</li>
  </ol>
  <p>Any direction where should we look next or ideas would be appreciated, thanks :) ?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-24T16:05:35.860Z
Comments.Text: - I guess you wont‘t see DoS in GA since it happens on the client side
   - Have you checked your Nginx logs for an increased amount of requests? Maybe from a limited IP range?
Comments.UserDisplayName: Matthias Redl-Mann
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-25T07:45:06.857Z
Comments.Text: Try to disable all the images of your website to check if you get any change after a reboot. Note that with large scale images, even the CP can have to generate small thumbs, which can sometimes overload a low powered server.
Comments.UserDisplayName: Romain P.
Tags: <performance>
Title: 100% CPU usage since a few days
ThreadText: # 100% CPU usage since a few days
  
  (Asked by: username_0 on 2022-05-24)
  
  so We're having 100 % CPU usage (memory usage is quite normal, load average is high more than 5 or 6) on my Craft 2 production since a few days now. I thought it's a background task but nopes. Thanks to the cache which is serving most public pages well and fast but the Craft admin dashboard is all clogged up, giving 502 Bad Gateway. Basically anything which requires code processing/compile isn't running. We're running Craft on a 4 vCPU and 8GB RAM.
  
  **This is when the things started getting bad :**
  
  [![100 percent usage](https://i.sstatic.net/6WZUF.jpg)](https://i.sstatic.net/6WZUF.jpg)
  
  **We're now having 100 percent CPU usage since then :**
  
  [![100 percent usage](https://i.sstatic.net/ycN2z.jpg)](https://i.sstatic.net/ycN2z.jpg)
  
  **Tasks on ubuntu**
  
  [![tasks on ubuntu](https://i.sstatic.net/MtLKg.png)](https://i.sstatic.net/MtLKg.png)
  
  **Things we've checked :**
  
  1. Checked Task manager in Dashboard
  2. Restarted nginx
  3. Restarted PHP
  4. Restarted whole server (droplet - Digital Ocean)
  5. Checked craft\_tasks table to see if background tasks running. It's empty.
  6. Checked PHP and Craft logs - seems fine
  7. Checked Google Analytics to see if any clue of Ddos
  
  Any direction where should we look next or ideas would be appreciated, thanks :) ?
  
  **Tags:** performance
  
  > **Comments:**
  > **username_1**: - I guess you wont‘t see DoS in GA since it happens on the client side  - Have you checked your Nginx logs for an increased amount of requests? Maybe from a limited IP range?  
  > **username_2**: Try to disable all the images of your website to check if you get any change after a reboot. Note that with large scale images, even the CP can have to generate small thumbs, which can sometimes overload a low powered server.  
  
  ---
  
  ## 0 answers
  
  