rtCamp / nginx-helper

Nginx Helper for WordPress caching, permalinks & efficient file handling in multisite
https://wordpress.org/plugins/nginx-helper/
228 stars 121 forks source link

Empty cache pages #329

Open DeeKey opened 7 months ago

DeeKey commented 7 months ago

Wordpress site is being used as a news agency with multiple editors working simultaneously online publishing articles. Recently the server was updated to Nginx -Srcache - Redis. Also there are two plugins: nginx-helper for page caching and Select Redis Object Cache for caching mysql queries.

After the first day of work we noticed that there are empty pages cached. No page code but only Cache stamps (stamped by nginx-helper). Cache was purged and the problem gone.

We have several guesses why it happened: 1) just a "rubbish" condition which will gone after clearing the cache entirely 2) some sort of nginx server misconfiguration 3) nginx-helper caused problems

Nginx-helper can cause problems during massive simultaneous post publishing. It will try to clean all the cached pages related to the post being published and can fail to do it correctly as there are many requests to purge the same page over and over again.

Also there might be nginx config problems. I read that this might be related to the caching key. But our key seems ok: set $key "nginx-cache:$scheme$request_method$host$request_uri";

If someone have idea how to fix or prevent the mentioned condition from ever occurring please post reply here!