Fastcgi_cache_use_stale http_500 http_502 http_503 http_504

I get an error with this:

fastcgi_cache_use_stale error timeout invalid_header http_500 http_502
http_503 http_504;

Are http_502 http_503 http_504 not yet available for
fastcgi_cache_use_stale?

Hi,

I get an error with this:

fastcgi_cache_use_stale error timeout invalid_header http_500 http_502
http_503 http_504;

Are http_502 http_503 http_504 not yet available for
fastcgi_cache_use_stale?

Those error codes are not really applicable in FastCGI environment, so
don’t
worry about that :wink:

Best regards,
Piotr S. < [email protected] >

Well if I get a 502 or 504 from php I’d like to serve stale. How is
that not applicable?

Well if I get a 502 or 504 from php I’d like to serve stale. How is
that not applicable?

If your PHP script called over FastCGI responds with either 502 (Bad
Gateway) or 504 (Gateway Timeout), then it be broken :wink:

Best regards,
Piotr S. < [email protected] >

On Thu, Jan 28, 2010 at 3:26 PM, Hone W. [email protected]
wrote:

nginx Info Page

You can use fastcgi_intercept_errors_on and then set an error_page for
the 500s.

– Merlin

it be broken :wink:

it must be broken*

Best regards,
Piotr S. < [email protected] >

On Fri, Jan 29, 2010 at 6:48 PM, Piotr S. [email protected]
wrote:

it be broken :wink:

it must be broken*

Not necessarily.

During traffic spikes mysql may become overloaded and when this
happens php-fpm can time out returning a 500 error.

Thanks Merlin :slight_smile:

Not necessarily.

During traffic spikes mysql may become overloaded and when this
happens php-fpm can time out returning a 500 error.

500 and 503 are supported error codes, we were talking about 502 and
504.

Best regards,
Piotr S. < [email protected] >

Sorry I meant 50x as opposed to 500 specifically. Either way there
are scenarios that can cause 50x errors when there is not an error in
your php.