0

What would cause MySQL to suddenly run at almost 800% CPU or quit running? Our Drupal 7.50 site has started crashing recently.

First time the site went down, the website displayed this error to the public:

PDOException: SQLSTATE[08004] [1040] Too many connections in _registry_check_code() (line 3462 of /var/www/html/example/docroot/includes/bootstrap.inc).

MySQL exceeded max_connections and I had to reboot the server because temporarily increasing from 151 to 500 still didn't help. I checked top and saw that MySQL was running at almost 800% CPU.

Restarting the VPS was the only thing that helped this.

enter image description here

enter image description here

The second time, the Drupal site only displayed a white page to the public, but the command drush ws produced the following error:

Drush command shows: PHP Fatal error: Call to undefined function module_exists() in /usr/local/src/drush/commands/core/drupal/environment_7.inc on line 187

I confirmed with top that MySQL was not running. Records show that it was running at this same high CPU for several hours just before it stopped.

enter image description here

In this case, all I had to do was restart MySQL.

Is this a Drupal performance issue, traffic related, spam or something else? Any help is appreciated to troubleshoot this issue.

  • Possibly from a DDoS attack. PS: no need to take screenshots with your phone, use the Print Screen (Prt Scr) button in your keyboard. – No Sssweat Feb 11 '17 at 0:56
  • Those are regular keyboard shortcut computer screenshots... no phone involved. How do I see if it was a DDoS attack? – Christia Feb 11 '17 at 1:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.