Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kirkre opened this issue Dec 4, 2022 · 0 comments
Open

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

kirkre opened this issue Dec 4, 2022 · 0 comments

Comments

@kirkre
Copy link

kirkre commented Dec 4, 2022

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

  • Trying 127.0.0.1:80...
  • Connected to localhost (127.0.0.1) port 80 (#0)

PURGE /bookings HTTP/1.1
Host: localhost
User-Agent: curl/7.74.0
Accept: /

<

  • Excess found: excess = 9944 url = /bookings (zero-length body)
  • Connection #0 to host localhost left intact

Thanks,

Kirk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant