Menu

Not a DDoS but an OPcache bug: 600 MB PHP-FPM workers on a server with 5,500 WordPress sites
πŸ“°

Not a DDoS but an OPcache bug: 600 MB PHP-FPM workers on a server with 5,500 WordPress sites

DEV Community: phpΒ·Oleg UsoltsevΒ·15 days ago
#UX8zzztm
#devto#dev#issuecomment#l1457#l1321
Long article (6970 words) β€” no AI summary yet.
Reading 0:00
15s threshold

The client wrote: the sites are down, looks like a DDoS. The server runs about 5,500 WordPress sites on nginx, PHP-FPM 8.4 and MariaDB, with 125 GB of RAM on Debian 13. I found a scanner, blocked it in nginx, and the sites came back. Two days later the client wrote again: now everything falls over every five minutes.

The cause was not outside. Every new PHP-FPM worker weighed about 600 MB from its very first request, and the OOM killer took turns shooting the database and nginx. The workers were inflated by a bug in OPcache that fires on every cache reset under load. The resets came from Yoast SEO during an update. Not the regular update across all sites, but a catch-up run on 467 sites where the scheduled one had failed. In the end, the order of two commands decided everything.

Below is how I found it, step by step, and what I changed.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.