Hi
I am running drupal with Nginx on ubuntu 14.04, 4gb memory DO plan. and PHP5 and on htop i notice that the CPU usage is 100%,
In htop the top processes are

www-data (virt 56680, res 4540, command php-fpm: pool drupal)
There are a number of the above pool drupal php-fpm processes taking up lots of CPU.

I have enabled opcache in php.ini (not cli)

Does anyone know how I can get the CPU down? Its strange as it started happening for no apparent reason.

1 comment
  • Also here is a snippet from my error log, something seems to think its wordpress when its actually drupal?

    2018/06/12 08:04:35 [error] 1487#0: *905 FastCGI sent in stderr: “Unable to open primary script: /var/www/html/drupal/wp-login.php (No such file or directory)” while reading response header from upstream, client: 127.0.0.1, server: , re$
    2018/06/12 08:07:04 [error] 1487#0: *924 FastCGI sent in stderr: “Unable to open primary script: /var/www/html/drupal/wp-login.php (No such file or directory)” while reading response header from upstream, client: 127.0.0.1, server: , re$
    2018/06/12 08:09:51 [error] 1487#0: *935 FastCGI sent in stderr: “Unable to open primary script: /var/www/html/drupal/wp-login.php (No such file or directory)” while reading response header from upstream, client: 127.0.0.1, server: , re$
    2018/06/12 08:19:33 [error] 1487#0: *982 FastCGI sent in stderr: “Unable to open primary script: /var/www/html/drupal/wp-login.php (No such file or directory)” while reading response header from upstream, client: 127.0.0.1, server: , re$
    2018/06/12 08:20:26 [error] 1487#0: *982 FastCGI sent in stderr: “Unable to open primary script: /var/www/html/drupal/wp-login.php (No such file or directory)” while reading response header from upstream, client: 127.0.0.1, server: , re$
    2018/06/12 08:23:41 [error] 1487#0: *1006 FastCGI sent in stderr: “Unable to open primary script: /var/www/html/drupal/wp-login.php (No such file or directory)” while reading response header from upstream, client: 127.0.0.1, server: , r$
    2018/06/12 08:26:12 [error] 1487#0: *1006 FastCGI sent in stderr: “Unable to open primary script: /var/www/html/drupal/wp-login.php (No such file or directory)” while reading response header from upstream, client: 127.0.0.1, server: , r$
    2018/06/12 08:27:11 [error] 1487#0: *1006 FastCGI sent in stderr: “Unable to open primary script: /var/www/html/drupal/wp-login.php (No such file or directory)” while reading response header from upstream, client: 127.0.0.1, server: , r$
    2018/06/12 08:30:07 [error] 1487#0: *1034 FastCGI sent in stderr: “Unable to open primary script: /var/www/html/drupal/wp-login.php (No such file or directory)” while reading response header from upstream, client: 127.0.0.1, server: , r$
    2018/06/12 08:59:30 [error] 1487#0: *1198 FastCGI sent in stderr: “Unable to open primary script: /var/www/html/drupal/d7.php (No such file or directory)” while reading response header from upstream, client: 127.0.0.1, server: , request$
    2018/06/12 08:59:35 [error] 1487#0: *1198 FastCGI sent in stderr: “Unable to open primary script: /var/www/html/drupal/d8.php.php (No such file or directory)” while reading response header from upstream, client: 127.0.0.1, server: , req$
    2018/06/12 09:00:30 [error] 1487#0: *1220 FastCGI sent in stderr: “Unable to open primary script: /var/www/html/drupal/wp-login.php (No such file or directory)” while reading response header from upstream, client: 127.0.0.1, server: , r$
    2018/06/12 09:12:40 [error] 1487#0: *1341 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 127.0.0.1, server: , request: “GET /?q=user HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php5$
    2018/06/12 09:14:02 [error] 1487#0: *1347 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 127.0.0.1, server: , request: "GET /?q=user HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php5$

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.

×
1 answer

Hi @matt41f5576fd18eff1f5bf8ed,

This sounds like just a lot of traffic. I’ll recommend you to try and find out of it’s legit or not. If it’s legit traffic, you’ll need an upgrade of your droplet.

If the traffic is not legit(coming from countries that won’t access or have nothing to do with your website), then I’ll recommend blocking them and see if the issue would still be experienced.

Regards,
KDSys

Submit an Answer