• Resolved Kevin F Benz

    (@seattlearchdiocese)


    Wanted to make your team aware of an apparent issue with Cache Preload. It appears that Cache Preload, when triggered has been making 6 requests to every URL on our site, swamping my CPU for upwards to an hour. Every day, between 6:00am (Pacific) until about 7:00am, my server receives a storm of traffic from the local host IP address. Each request appears to be coming from its own thread. (see the consecutive port selected).

    I’ve been observing this behavior for the last couple of weeks, as it’s been consistent for the time window on a daily basis.

    It’s not a resource issue, as that Virtual Host has a 4 processor core with 16gb of memory. Apache and php-fm has been optimized for maximum performance. Firewall rate-limits are bypassed due to the fact that the traffic is coming from behind the firewall. (I don’t throttle internal requests)

    WP-Optimize makes 6 requests to each page in each language (English & Spanish) on the site. In total, 3900 requests are made (every Page, Post & Event) . Although my back-end is built to support it, the subsequent processor spike essentially appears to be a denial of service attack, with all legitimate clients impacted during this processing window, with all site editors seeing performance issues in this window.

    When I disable WP-Optimize Cache Preload, the traffic storm no longer occurs.

    For example, (one page) from my logs:

    For the page: https://archseattle.org/about-the-archdiocese-of-seattle/archbishop-etienne/racial-justice/

    Web Server IP 52.247.209.218

    WP-Optimize has made 6 requests within a second, which routes to my firewall (Azure Front Door WAF)

    52.247.209.218:57822 – – [22/Nov/2023:15:04:44 +0000] “GET /about-the-archdiocese-of-seattle/archbishop-etienne/racial-justice/ HTTP/1.1” 200 20794 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36”
    52.247.209.218:57812 – – [22/Nov/2023:15:04:44 +0000] “GET /about-the-archdiocese-of-seattle/archbishop-etienne/racial-justice/ HTTP/1.1” 200 20794 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36”
    52.247.209.218:57800 – – [22/Nov/2023:15:04:44 +0000] “GET /about-the-archdiocese-of-seattle/archbishop-etienne/racial-justice/ HTTP/1.1” 200 20794 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36”
    52.247.209.218:57838 – – [22/Nov/2023:15:04:44 +0000] “GET /about-the-archdiocese-of-seattle/archbishop-etienne/racial-justice/ HTTP/1.1” 200 20794 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36”
    52.247.209.218:57834 – – [22/Nov/2023:15:04:44 +0000] “GET /about-the-archdiocese-of-seattle/archbishop-etienne/racial-justice/ HTTP/1.1” 200 20794 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36”
    52.247.209.218:57848 – – [22/Nov/2023:15:04:44 +0000] “GET /about-the-archdiocese-of-seattle/archbishop-etienne/racial-justice/ HTTP/1.1” 200 20794 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36”

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support vupdraft

    (@vupdraft)

    Hi,

    There are several parameters you can play with to throttle the preload:
    – Using add_filter(‘wpoptimize_preload_delay’, ‘my_preload_delay_method’), you can override the delay between two pages, which is currently set at 500000 (1/2 a second).

    – Using add_filter(‘wpo_page_cache_preload_memory_threshold’, 10485760);
    That filter lets you change how much memory should be left before interrupting the preload queue (10MB by default).

    – Using add_filter(‘wpo_page_cache_preload_continue_interval’, 600);
    This filter enables to change the time before the preload resumes when interrupted (600s by Default).

    Thread Starter Kevin F Benz

    (@seattlearchdiocese)

    Thanks for the response.. Why though is every request for each time made 6 times? I like the ability to throttle requests, but what about the extra requests? Wouldn’t doing a HEAD vs GET be a little more efficient as well?

    Thread Starter Kevin F Benz

    (@seattlearchdiocese)

    Looking at the data, I assume that the preload delay would not apply to this 6 request issue, since your assertion is “delay between pages” would not apply, since it’s 6 requests to the same page?

    A you can see, 6 requests with the exact same timestamp.

    52.247.209.218:57822 – – [22/Nov/2023:15:04:44 +0000] “GET /about-the-archdiocese-of-seattle/archbishop-etienne/racial-justice/ HTTP/1.1” 200 20794 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36”
    52.247.209.218:57812 – – [22/Nov/2023:15:04:44 +0000] “GET /about-the-archdiocese-of-seattle/archbishop-etienne/racial-justice/ HTTP/1.1” 200 20794 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36”
    52.247.209.218:57800 – – [22/Nov/2023:15:04:44 +0000] “GET /about-the-archdiocese-of-seattle/archbishop-etienne/racial-justice/ HTTP/1.1” 200 20794 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36”
    52.247.209.218:57838 – – [22/Nov/2023:15:04:44 +0000] “GET /about-the-archdiocese-of-seattle/archbishop-etienne/racial-justice/ HTTP/1.1” 200 20794 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36”
    52.247.209.218:57834 – – [22/Nov/2023:15:04:44 +0000] “GET /about-the-archdiocese-of-seattle/archbishop-etienne/racial-justice/ HTTP/1.1” 200 20794 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36”
    52.247.209.218:57848 – – [22/Nov/2023:15:04:44 +0000] “GET /about-the-archdiocese-of-seattle/archbishop-etienne/racial-justice/ HTTP/1.1” 200 20794 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36”

    Plugin Support Kowsar Hossain

    (@kowsar89)

    1. Do you have any multilingual plugins installed? If so, which one are you using?
    2. Could you kindly provide a screenshot of the folder containing cached pages so that I can determine the number of files it contains? For instance, for the page at https://archseattle.org/about-the-archdiocese-of-seattle/archbishop-etienne/racial-justice/, the folder’s location might be wp-content/cache/wpo-cache/about-the-archdiocese-of-seattle/archbishop-etienne/racial-justice. As an illustrative example, in the screenshot linked here, you can observe that there are 5 files within that folder, screenshot: https://prnt.sc/DXfuBGt5I-mH
    Thread Starter Kevin F Benz

    (@seattlearchdiocese)

    Only 3 files, not 5.

    Thread Starter Kevin F Benz

    (@seattlearchdiocese)

    Translation Plugin: WPML (current version)

    Plugin Support Kowsar Hossain

    (@kowsar89)

    If you manually click the Preload button, does it also trigger 6 requests per URL?

    Thread Starter Kevin F Benz

    (@seattlearchdiocese)

    Yes multiple, but in that case, 4 consecutive attempts

    Plugin Support Kowsar Hossain

    (@kowsar89)

    And how many files are there in this case for a page? Would be helpful if you could share a screenshot

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Issue with Cache Preload’ is closed to new replies.