FRiCKLE / ngx_cache_purge

nginx module which adds ability to purge content from FastCGI, proxy, SCGI and uWSGI caches.
http://labs.frickle.com/nginx_ngx_cache_purge/
Other
1.06k stars 310 forks source link

ngx_cache_purge not working with separate upstream php-fpm server #77

Open kirkre opened 1 year ago

kirkre commented 1 year ago

I have the following issue with ngx_cache_purge. Any help with this will be greatly appreciated.

I'm using the Debian dynamically loaded ngx_cache_purge module in Bullseye. I have Nginx running in one server, and php-fpm running in a separate upstream server, with the goal of being able to horizontally scale php-fpm servers. The webroot is shared by both servers via nfs. With php-fpm running on a single server and all else being the same, purging through ngx_cache_purge works fine, using either curl or nginx-helper. With separate servers the cache fails to clear. Using nginx-helper there are no errors in the logs of nginx-helper, nginx, or php-fpm. Using curl there are no errors in the logs of nginx or php-fpm. The log level of php-fpm is debug, and the log level of nginx is warn. Here is the result I get trying to purge the cache with curl on the two server configuration:

curl -vvv -X PURGE -I http://localhost/bookings

<

Thanks,

Kirk