• 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 15 replies - 1 through 15 (of 28 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jmichaudelisys

    I am sorry about the issue you are experiencing and I am happy to assist you with this.
    When I’ve inspected your website I can see in W3TC HTML snippet that you are using Redis at the moment??
    If you switch to Page Enhanced does the issue persist?
    Are you using any other caching solution like server-side caching or CDN possibly?
    Thank you!

    Thread Starter jmichaudelisys

    (@jmichaudelisys)

    Hello Marko,

    Yes, we are using temporally Redis for this website.

    When you say the Page Enhanced, you probably refer to the page cache method “Disk enhanced”. Otherwise, I don’t see any options with that label.

    We do not use other caching solution. We do have a file server that is reachable by two IPs, but we did not configure the CDN options in W3TC settings.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jmichaudelisys

    Thank you for the information. Sorry, I meant to say Disk Enhanced.
    Have you tried using Disk Enhanced?
    I can see that now you are using Memcached and as far as I can see everything is working as expected?
    Thank you!

    Thread Starter jmichaudelisys

    (@jmichaudelisys)

    Disk Enhanced is not a viable option because disk access is a bottleneck. We need to access those cache files from the RAM. As a matter of facts, other plugins gives a better performance with disk caching.

    Yes, I switch back to Memcached with our custom settings used by our sites, since a lot of issues happens with your default settings. Sorry about that, but It won’t change again, I promise!

    It ain’t working as expected as I follow closely our server logs and purge the cache when an issue happens.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Thread Starter jmichaudelisys

    (@jmichaudelisys)

    It happens on both pages and other pages as well. This morning, another website has the same issue on every pages. We fix it temporary by purging the cache

    Thread Starter jmichaudelisys

    (@jmichaudelisys)

    I investigate the memcache statistics and I see a huge difference between two servers with the delete_hits stat. Thoses servers configurations are similar and originally share the same W3TC configs.

    The first one is handling the cache without problems and has the page, object and browser cache enabled. It also has much more traffic.
    The second one has the issue explained in this topic and we disable the object and browser caching to narrow down the problem.

    First Server (handle cache as expected)
    STAT get_hits 25263239
    STAT get_misses 14321552
    STAT delete_misses 9702
    STAT delete_hits 205612

    Second Server (has cache issue)
    STAT get_hits 70489
    STAT get_misses 60727
    STAT delete_misses 5845
    STAT delete_hits 6

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jmichaudelisys

    It appears that something is wrong with your Memcached server configuration.
    Delete hits – This component returns the number of deletion requests resulting in an item being removed.
    Delete misses- This component returns the number of deletion requests for missing keys.
    Please double-check your configuration.
    Thanks!

    Thread Starter jmichaudelisys

    (@jmichaudelisys)

    I made a few tests activating only one caching module at a time. I flush the cache, access memcached stats, visit a few times the front-page, flush the cache again and get memcached stats

    Page cache – Active : The Delete Hits does not increment, nor the delete misses.

    Deactivate Page cache, Activate Object cache : The Delete hits increments.

    I doubt the problem is our memcached configuration since it worked before our core/plugins update. The issue happens also on a Redis cache.

    Can you confirm what is the key used to store data in memcached/redis? Is it the “Cache key” that appears within the HTML comments?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jmichaudelisys

    Sorry for the late reply.
    We are to reproduce this but unsuccessfully so far. I am checking this and I’ll reply as soon as we investigate this.
    Thank you!

    Thread Starter jmichaudelisys

    (@jmichaudelisys)

    Hello Marko,

    we are investigating this issue and I will let you know if we find something.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jmichaudelisys

    that usually happens when WordPress returns WSOD because of some failure (in code itself, or e.g. MySQL outage) and W3TC cache it.

    There is some protection inside W3TC against that, but still, it’s possible especially on weaker environments.
    In order to investigate further, you need to check what’s there in Memcached storage at the moment of an empty response.

    It’s better to log cache key by something like:

    add_filter( 'pagecache_page_key', 'my_logger' );
    
    function my_logger($key_parts) {
        error_log( implode( '', $key_parts );
    }

    open the page of interest and read it from the log. Check what’s there in memcached afterwards.
    Thank you!

    Thread Starter jmichaudelisys

    (@jmichaudelisys)

    all right, i will look into it! Thank you for this filter, much appreciate!

    Thread Starter jmichaudelisys

    (@jmichaudelisys)

    Hello Marko,

    I add some logs to retrieve the key and here is one value when an issue occured.

    VALUE w3tc_495857040__0_pgcache_2dc615f96b85ac7e7b8e8aa93bee2b2d 4 395
    a:5:{i:404;b:0;s:7:"headers";a:4:{s:11:"Status-Code";i:200;s:12:"Content-Type";s:24:"text/html; charset=UTF-8";i:0;a:2:{s:1:"n";s:4:"Link";s:1:"v";s:68:"<https://www.sherbrooketoyota.ca/wp-json/>; rel="https://api.w.org/"";}i:1;a:2:{s:1:"n";s:4:"Link";s:1:"v";s:52:"<https://www.sherbrooketoyota.ca/fr/>; rel=shortlink";}}s:4:"time";i:1581969739;s:7:"content";s:2:"
    
    ";s:11:"key_version";i:176;}

    Yesterday, I was able to reproduce the error. I call some URLs that make a permanent redirect to the front page. When the error occured, I call a few times the front-page and see the WSOD. I purge the cache and call again the front-page. I look into the log and I see the key_version is incremented by more than 1. I have a feeling that each time I access the front-page and it returns the WSOD, the key version seems to increment by the number of times the WSOD is reach. I am actually investigating to confirm the behavior.

    Here is the content of the key once i purge the cache.

    VALUE w3tc_495857040__0_pgcache_2dc615f96b85ac7e7b8e8aa93bee2b2d 84 26515
    g8?a:5:{i:404;b:0;s:7:"headers";a:4:{s:11:"Status-Code";i:20@+12:"Content-Typ s:24:"text/html; charset=UTF-8@90 U2

    U:”n@0 /Link@
    v@68:”<https://www.sherbrooketoyota.ca/wp-json/&gt;; rel=”?/api.w.org/””;}i:1?p5 ??pfr?kshortl?}}?tim ? 581970154!
    !Jc?@?145113:”

    <!doct!0 A$>[some_html_that_seems_compressed]
    “;s:11:”keyS;i:178;}`

    Thread Starter jmichaudelisys

    (@jmichaudelisys)

    Is there any way to avoid caching pages that make a 301 redirect?

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