Frequent timeouts on Statamic site despite static caching (“half”) — requests hitting PHP instead of cache #12482
stephenmeehanuk
started this conversation in
General
Replies: 1 comment
-
Hmmm. Looks like this is related to Weglot (which uses Cloudflare). When I cURL a cached asset, it still outputs
I've got a cache policy of 7 days for CSS (and other assets). Cloudflare Ignores It: Treats as dynamic anyway Weglot is processing every single request - even CSS files - and marking them as dynamic content. This forces Cloudflare to bypass its edge cache completely. No edge caching = Every request hits your PHP-FPM. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I’m seeing lots of
60s
PHP-FPM timeouts andrecv() failed ... from upstream
in NGINX, while responses show cf-cache-status: DYNAMIC and Set-Cookie, implying pages aren’t being served from a pre-baked/static cache. Looking for guidance on why Static Caching (“half”) might be bypassed and how to stop anonymous requests from starting sessions / missing cache.Context
STATAMIC_STATIC_WARM_QUEUE
, workers runningSymptoms
Lots of PHP-FPM timeouts
NGINX upstream read errors
Responses look dynamic (not cached)
What I’ve tried
NGINX fastcgi timeouts (per site):
PHP-FPM pool tweaks:
memory_limit
lowered to 256M (from 1024M).Despite this, during traffic bursts many requests still time out and logs show PHP generating pages.
Logs
NGINX error log (fastcgi upstream)
PHP-FPM slow log (Statamic stack & locking)
This looks like requests are waiting on locks (static cache generation?) and doing heavy template/YAML work instead of serving a pre-rendered page.
Response headers (dynamic)
###Questions
Are there any known conditions that disable/bypass static caching (“half” strategy) for anonymous GET/HEAD?
Lock contention during cache generation?
Sleep::goodnight()/Cache::block()
aroundStaticCaching\Middleware\Cache
.high concurrency
be dog-piling on uncached pages, causing lock waits → timeouts?Warmers
###Env details
Happy to provide template snippets (layouts/partials), and any specific config you want to see.
Thanks in advance for any pointers!
Beta Was this translation helpful? Give feedback.
All reactions