• Resolved jmichaudelisys

    (@jmichaudelisys)


    Hello there,

    A few times a day, some public pages return a white page, with 200 status code and others with 404. We use memcached for all our sites and made a test with Redis for one website. We use the page, object and browser cache.

    This issue appears when we update our websites to the latest WP5.3.2 with all our plugins/themes updated to the latest version. We had W3TC 0.11.0 and we update it to 0.12.0. A Few weeks ago, a new update to 0.13.0. The issue still persists.

    We tried to narrow down the problem by deactivating the object cache first, then the browser cache. Deactivating the object cache helps a lot and less issues happens. Then we made a new test on a single site, changing memcached for redis. The issue still exists.

    For your information, the XMLRPC file is inaccessible and we remove all ping features that access this file, as much as the Header “X-Pingback” that the page cache send back.

    I tried to verify the value registered in memcache, using the page debug fonctionnality, but it turns out the “Cache key” is not the key used by memcached. Can you provide some insight about the key used by memcache or redis?

    My first guess were concurrent access, but the issue happens when there is only a few visits. So it seems that the page is caching an empty body, but i can’t figure out why.

    Here is the header we receive when we reach a white page. Thank you for your time!

    HTTP/1.1 200 OK
    Server: nginx
    Date: Wed, 05 Feb 2020 05:01:38 GMT
    Content-Type: text/html; charset=UTF-8
    Transfer-Encoding: chunked
    Connection: keep-alive
    Vary: Accept-Encoding
    Link: <https://www.dummy-domain.ca/wp-json/&gt;; rel=”https://api.w.org/&#8221;
    Link: <https://www.dummy-domain.ca/fr/&gt;; rel=shortlink
    Last-Modified: Wed, 05 Feb 2020 04:04:23 GMT
    ETag: “e1c06d85ae7b8b032bef47e42e4c08f9”
    Strict-Transport-Security: max-age=15768000

    The page I need help with: [log in to see the link]

Viewing 13 replies - 16 through 28 (of 28 total)
  • Thread Starter jmichaudelisys

    (@jmichaudelisys)

    Hello Marko, I find the real issue behind all this.

    When we receive HEAD request on a page and it needs to refresh the cache, the new cache have the right header, but without the body. I follow closely the access log and the behavior is always the same.

    It seems that you had an option “Reject HEAD requests” but i cannot find it. Can you help me? thank you!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jmichaudelisys

    Thank you for the info. Reject HEAD requests: is in Performance>Page Cache>Advanced section available when Dish: enhanced is set as a caching method.
    There is a possibility that that option was enabled and the setting remained historically.
    Can you please switch to Dish: enhanced and see if that option is checked?
    Thank you!

    Thread Starter jmichaudelisys

    (@jmichaudelisys)

    Hello marko,

    I find this option when I switch the cache system for Disk Enhanced, but this option has the html attribute “disabled”, so it is “impossible” to check this box. I did remove the attribute, check the box and save the settings. On page reload, the option is still uncheck, so I validate the “w3tc-config/master.php” and the value is set to true, which is correct. But the interface is showing otherwise and it could lead to a misinterpretation.

    I validate the default settings of your plugin in “ConfigKeys.php” and I see the value is set to false. I doubt this is a good default settings. From my point of view, HEAD requests should never be cache.

    I use those type of requests when I do not care about the content. As for an example, when I validate a sitemap and be sure every links return does not return a 404 status code.

    Is it fine to fix this issue by setting the value to “true” in my “w3tc-confg/master.php” file or there is some chances this value will change?

    Will you plan to change this default setting in near future?

    Thank you!

    Thread Starter jmichaudelisys

    (@jmichaudelisys)

    One more recommandation would be to set a different cache key that integrate the type of request. I think this will be a more effective solution.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jmichaudelisys

    Thank you for the information.
    We are checking this and I’ll get back to you as soon as we investigate.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,

    HEAD is never cached by Disk: Enhanced, that’s why this option is disabled.

    It’s controlled by a snippet

    if ( isset( $_SERVER['REQUEST_METHOD'] ) && strtoupper( $_SERVER['REQUEST_METHOD'] ) == 'HEAD' &&
    			( $this->_enhanced_mode || $this->_config->get_boolean( 'pgcache.reject.request_head' ) ) ) {
    			$this->cache_reject_reason = 'Requested method is HEAD';
    
    			return false;
    		}

    You may check that your server keeps correct $_SERVER[‘REQUEST_METHOD’] for such requests.
    Thank you!

    Thread Starter jmichaudelisys

    (@jmichaudelisys)

    Hello Marko, The condition is good enough with the cache engine Disk Enhanced, but we are using Memcached, so this is why HEAD requests are saved in the cache.

    Thread Starter jmichaudelisys

    (@jmichaudelisys)

    Hello Marko, are-you investigating/confirming this issue?

    Have a nice day

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jmichaudelisys

    Sorry for the late reply. We are trying to replicate this but this seems like an environment-specific issue.
    We are checking this and will reply when we investigate.
    Thanks!

    Thread Starter jmichaudelisys

    (@jmichaudelisys)

    A simple message to keep this thread active.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jmichaudelisys

    Sorry for the late reply.
    I’ve consulted with the team and I can confirm that this kind of issue may happen in some cases such as yours.
    This will be fixed in the next release.
    Thank you for your patience.

    Thread Starter jmichaudelisys

    (@jmichaudelisys)

    Thank you for the support Marko,

    Can you tell me more specifically what was wrong and what is the approach to resolve the issue?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jmichaudelisys

    I just need to change some rules for different environments.
    I’ll make sure to drop you a note once this is fixed.
    Thank you!

Viewing 13 replies - 16 through 28 (of 28 total)
  • The topic ‘Page Cache – White Screen – WP>5.2.3’ is closed to new replies.