Why Is My Drupal Site Suddenly Using 100% CPU?
When a Drupal site suddenly starts consuming most or all of the available CPU, the obvious conclusion is that the website is receiving too much traffic.
Sometimes that is true.
But high CPU can come from several very different sources: PHP requests, database activity, cron, Drush commands, queue workers, bots, or a process that has simply got stuck.
We recently investigated a Drupal server where the load average had climbed above 20 and remained high for an extended period.
At first glance, it looked like a traffic problem.
It wasn't.
Why Is my Drupal cache database table getting so large?
A large Drupal cache database does not necessarily mean Drupal is failing to clear its cache.
We recently investigated a site where the cache tables appeared to be behaving normally: cron was running and the number of records in cache_page was being kept at around 5,000.
But the table itself had grown to hundreds of megabytes.
At one point, roughly 5,000 cached pages were consuming more than 800 MB.
The culprit was not broken cache clearing.
It was faceted search.