Sudden CPU 100% with php-fpm on Wordpress website

Hi everybody,

so two days ago something happened (no updates, no changes of configuration) and my droplet started non responding. Ever since the CPU is at 100% (unless I systemctl stop httpd) and more specifically the php-fpm process. More specifically is one user, for which the error.log il filled up with strings of this sort:

[fcgid:warn] [pid 20704] [client] mod_fcgid: can't apply process slot for /home/xxx/fcgi-bin/php7.1.fcgi, referer:

(Sometimes is google, bing, yahoo, …). So I though it was a DDOS attack and I thus made a new rule on my fail2ban like so:

enabled = true
port = http,https
filter = http-get-dos
logpath   = /var/log/varnish/varnishncsa.log
maxretry = 100
findtime = 30
backend = polling
journalmatch = 
banaction = iptables-multiport
action = %(action_)s

(I specify polling because on default varnish runs on systemd). The configuration seems to work, and in fact if I run fail2ban-client status http-get-dos I do get some bans (currently 6).

However the CPU is still 100%… Any other ideas? Something else to look at I may be missing?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I would suggest mod_security. It works on apache, IIS, and nginx, and can do a lot to prevent D/DoS attacks. Here’s a random tutorial