Forum: NGINX how to ensure 5xx pages served by nginx dont get cached by users?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
nginx.mailinglist (Guest)
on 2008-12-20 00:07
(Received via mailing list)
I noticed that under heavy loads nginx returns a default 5xx response
Anyways sometimes users email me saying they encountered the error and
wont go away, me telling them to clear their browser cache usually
the issue, so that leads me to believe these pages are cached

Am i missing something is there an option to make nginx return "no
headers along with a default 5xx error message?

Using nginx 0.6.32 on a few dozen Suse 10.* and 11.* servers with
and php-fpm patch

Oh and thank you :)
Dave C. (Guest)
on 2008-12-20 01:10
(Received via mailing list)

Are you sure its nginx that is returning the 50x page, and not the
application behind it? The rails failsafe error handler returns a 200
status code with some body text that looks like a 503 page.

If it was a real 503 error page (with a 503 status code) then it will
_not_ be cacheable as 50x error codes are not cacheable by the browser
or intermediary proxies.


nginx.mailinglist (Guest)
on 2008-12-20 03:06
(Received via mailing list)
yep seems to happen when php fails under heavy load, its kinda hard to
replicate for me as it seems occur when server is very busy
and yes some browsers seem to cache these :(
This topic is locked and can not be replied to.