Welcome! Log In Create A New Profile

Advanced

File is not refreshed when using proxy_cache_use_stale

February 10, 2012 05:05AM
I have following config:

location /images {
proxy_pass http://my.host;
proxy_redirect off;
proxy_cache static-cache;
proxy_cache_valid any 5m;
proxy_cache_valid 404 5m;
proxy_cache_use_stale updating invalid_header error timeout http_502;
}

The idea is that if backend server reply with error/timeout/invalid header it will return stale version and cache it for 5m. Generally it works ok but sometimes I have situation when one of my proxy cache servers (I have 3 of them) returns stale version and will not refresh file until I delete nginx cache files. Here is output from nginx -V:

$ nginx -V
nginx version: nginx/0.7.65
TLS SNI support enabled
configure arguments: --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/body --http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug --with-http_stub_status_module --with-http_flv_module --with-http_ssl_module --with-http_dav_module --with-http_gzip_static_module --with-http_realip_module --with-mail --with-mail_ssl_module --with-ipv6 --add-module=/build/buildd/nginx-0.7.65/modules/nginx-upstream-fair

Is it known problem or I am doing something wrong?
Subject Author Posted

File is not refreshed when using proxy_cache_use_stale

radarek February 10, 2012 05:05AM

Re: File is not refreshed when using proxy_cache_use_stale

Maxim Dounin February 10, 2012 08:46AM

Re: File is not refreshed when using proxy_cache_use_stale

radarek February 10, 2012 09:45AM

Re: File is not refreshed when using proxy_cache_use_stale

Maxim Dounin February 10, 2012 10:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 54
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready