Join GitHub today
Cold caches can spawn many phpfpm processes on really large sites. #1398
One would assume that if an HTML file has not been created for the static cache, and multiple visitors request it at the same time, a single child process would take place to create it, and tell the subsequent visitors to hang on a second until it's created.
Instead, it appears that any visitor requesting that URL at the same time spawns another phpfpm child process. It only takes 4 concurrent visitors to take down any Statamic site that hasn't created it's HTML cache file for that URL yet.
Steps to reproduce
If the HTML file was already there, everything is fine, but as it is right now, there’s nothing to stop Statamic from trying to create that HTML file for every single visitor that requests it until it is made (which becomes self defeating, as the more child processes, the less CPU there is to create it, and then we hid the max execution time no matter how many people are visiting).
2.5.8 / 2.5.9
Updated from an older Statamic or fresh install: