Hi, Can you please help here - basically after the cache expires, the upstream call is failing as not accessible and we are serving stale data to avoid failures.
After we reload the nginx- first call to upstream is successful and data is cached. Thanks! On Fri, May 15, 2020, 2:14 PM naidile.pn <[email protected]> wrote: > Hi All, > > We are using proxy cache to cache the response from upstream for a day. > But, when the cache expires, API stops responding with 500. > > Getting the error: open() "proxycachepath" failed (13: Permission denied) > > On reloading the nginx, server is able to connect to upstream and cache > response for the first time and works for next one day. > > Below is the nginx rule : > > location /somelocation { > add_header X-Proxy-Cache $upstream_cache_status; > proxy_cache my_zone; > proxy_ignore_headers X-Accel-Expires Expires Cache-Control; > proxy_cache_valid 200 1440m; > proxy_cache_use_stale error timeout http_500 http_502 > http_503 http_504; > proxy_pass someupstream; > proxy_pass_request_headers on; > proxy_connect_timeout 120; > proxy_send_timeout 120; > proxy_read_timeout 120; > } > > Can anyone please help here. > > Thanks! >
_______________________________________________ nginx-devel mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx-devel
