Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
While debugging issue #1527852: Random WSOD on D7 sites with Redis enabled also for anonymous visitors we discovered that the otherwise useful Nginx directive fastcgi_cache_use_stale
can cause caching upstream errors, and then effectively serving from cache some nice WSOD for all visitors, which is pretty crazy.
Comments
Comment #1
omega8cc CreditAttribution: omega8cc commentedFixed in commits:
6.x-1.x - http://drupalcode.org/project/provision.git/commit/2f55558
6.x-2.x - http://drupalcode.org/project/provision.git/commit/6ce5dbb
Comment #2
omega8cc CreditAttribution: omega8cc commentedWell, it doesn't help at all, so I was probably confused. It still caches WSOD header response even with
fastcgi_cache_use_stale
set tooff
so we probably need to stop caching HEAD requests instead.Comment #3
omega8cc CreditAttribution: omega8cc commentedSince we can't stop Nginx from caching, we have to make it 1s only cache (for DoS protection only).
Committed in:
6.x-1.x - http://drupalcode.org/project/provision.git/commit/a104712
6.x-2.x - http://drupalcode.org/project/provision.git/commit/cdfdca9
Comment #4
omega8cc CreditAttribution: omega8cc commentedWe should add error 403 to this list.
Comment #5
kepford CreditAttribution: kepford commentedThis bug also affects 403's.
Comment #6
kepford CreditAttribution: kepford commentedSorry Omega8, should have refreshed my page. You beat me too posting this.
Comment #7
omega8cc CreditAttribution: omega8cc commentedNote that this issue may be Barracuda/Octopus specific, as we force default TTL to 5 minutes there - and this is how we discovered this upstream bug. It may still affect any non-BOA user if he/she is using
X-Accel-Expires
header in his/her ownglobal.inc
file.Also related: #1535546: D7 site still shows "site in maintenance mode" after it was put live
While we need to force secure enough TTL for all not-OK responses by default to avoid this issue, we have submitted also a bug report upstream: http://trac.nginx.org/nginx/ticket/151
Comment #8
omega8cc CreditAttribution: omega8cc commentedFixed in commits:
6.x-1.x - http://drupalcode.org/project/provision.git/commit/02f54f6
6.x-2.x - http://drupalcode.org/project/provision.git/commit/c76cd1c