Welcome! Log In Create A New Profile

Advanced

Re: http 500 errors are not cached but go to the backend

January 08, 2013 05:19AM
Hi Maxim,

> Just a side note: the fastcgi_cache_lock directive doesn't affect
> update of the cache, it only affects adding new items to the
> cache. To handle cache updating the "fastcgi_cache_use_stale
> updating" should be used (it's actually already in your config).
>
Ok, that's good to know.

> The
>
> fastcgi_cache_use_stale http_500;
>
> in your config instructs nginx to don't cache 500 response but
> return stale cached content instead. As soon as original cached
> resource expires - nginx starts to ask backend about new response,
> but since 500 is returned it returns stale response to clients
> instead.
>
> In your case the behaviour looks a bit confusing as "original
> cached resource" above is the same 500 response (cached as
> fastcgi_cache_use_stale don't affect initial content caching), but
> the behaviour is as expected with your configuration - when you
> ask nginx to cache 500 responses and to don't use 500 responses
> for cache update at the same time.
>
Ok, got it. That was indeed confusing. Thanks for your explanation.

Bram
Subject Author Posted

http 500 errors are not cached but go to the backend

brama January 04, 2013 08:38AM

Re: http 500 errors are not cached but go to the backend

Maxim Dounin January 04, 2013 05:32PM

Re: http 500 errors are not cached but go to the backend

brama January 08, 2013 05:19AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 129
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready