Opened 5 years ago
Closed 5 years ago
#1795 closed defect (invalid)
Nginx proxy serving non-existent proxy cache files
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | critical | Milestone: | nginx-1.17.1 |
Component: | nginx-core | Version: | 1.15.x |
Keywords: | proxy cache | Cc: | |
uname -a: | Linux vps646306 4.4.0-150-generic #176-Ubuntu SMP Wed May 29 18:56:26 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux | ||
nginx -V: |
nginx version: nginx/1.17.0
built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.11) built with OpenSSL 1.1.1b 26 Feb 2019 TLS SNI support enabled configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC -DNGX_HTTP_HEADERS' --with-ld-opt='-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie' --add-module=/root/nginx-compile-from-source/ngx_pagespeed/incubator-pagespeed-ngx-1.13.35.2-stable --add-module=/root/nginx-compile-from-source/memc-nginx-module --add-module=/root/nginx-compile-from-source/srcache-nginx-module --add-module=/root/nginx-compile-from-source/ngx_devel_kit_module/ngx_devel_kit --add-module=/root/nginx-compile-from-source/set-misc-nginx-module/set-misc-nginx-module --add-module=/root/nginx-compile-from-source/headers-more-nginx-module/headers-more-nginx-module --add-module=/root/nginx-compile-from-source/replace-filter-nginx-module --with-ld-opt=-Wl,-rpath,/usr/local/lib --add-module=/root/nginx-compile-from-source/ngx_brotli --add-module=/root/nginx-compile-from-source/ngx_cache_purge --add-module=/root/nginx-compile-from-source/lua-nginx-module --add-module=/root/nginx-compile-from-source/ngx_http_geoip2_module |
Description
Hello. I make custom program for reverse proxy cache invalidation. And I found unexpected behavior.
My nginx.conf scheme:
1.server, port 443 (proxy_cache)
2.server, port 8088 (backend,pagespeed optimisation, proxied)
3.server, port 8087 (proxy cache purging server) Lua program, find in proxy_cache desired file and delete it.
Problem:
After file deletion from disk, some times. Nginx proxy_cache (server 1) still serving old deleted page. In HTTP headers - I can see cache HIT value. About 5 minutes, server 1(proxy), detect cache miss and send request to server 2.
Attachments (4)
Note:
See TracTickets
for help on using tickets.
This sounds like a problem in your setup and/or your cache invalidation code, but it doesn't looks like a problem in nginx. If you need help with your cache invalidation code, consider support options available. Alternatively, consider using proxy_cache_purge, which is available as part of our commercial subscription.