• Resolved Marcin Gminski

    (@gmmarcin)


    Hi,

    The plugin works great with one exception.
    I have a calendar plugin (https://webnus.net/modern-events-calendar/) which does a scheduled import of events. The import is done via cron that runs a php file via command line. The way the import works is that it will create new events (posts) or update existing posts. Each update triggers the cache purge which then results in too many Requests from cloudflare

    I have tried different plugin settings such as disabling purge on change and even excluding the whole URL from being cached but nothing seems to help.

    I even tried to change the queue timeout from 10 seconds to 60 seconds by editing the wp-cloudflare-super-page-cache.php but that did not work either.

    It feels like perhaps this plugin could be added to the 3rd party tab and be completely excluded?

    The below is just one example out of many:

    
    [Cloudflare] ERROR: [CLIENT API] Array
    (
        [type] => response
        [reason] => Too Many Requests
        [code] => 429
    )
     
    [Cloudflare] ERROR: Too Many Requests 
    [Cloudflare] ERROR: [CLIENT API] Array
    (
        [type] => request
        [path] => https://api.cloudflare.com/client/v4/zones/***REDACTED***/purge_cache
        [timeout] => 30
        [method] => DELETE
        [headers] => Array
            (
                [Content-Type] => application/json
                [X-Auth-Email] => REDACTED
                [X-Auth-Key] => REDACTED
            )
    
        [body] => {"files":["https:\/\/sqlwatch.io\/blog\/author\/","https:\/\/sqlwatch.io\/blog\/author\/feed\/","https:\/\/sqlwatch.io\/events\/","https:\/\/sqlwatch.io\/events\/feed\/","https:\/\/sqlwatch.io\/events\/data-saturday-albuquerque-2022-tentative-albuquerque-sql-server-user-group\/","https:\/\/sqlwatch.io\/feed\/rdf\/","https:\/\/sqlwatch.io\/feed\/rss\/","https:\/\/sqlwatch.io\/feed\/","https:\/\/sqlwatch.io\/feed\/atom\/","https:\/\/sqlwatch.io\/comments\/feed\/","https:\/\/sqlwatch.io\/events\/data-saturday-albuquerque-2022-tentative-albuquerque-sql-server-user-group\/feed\/","https:\/\/sqlwatch.io\/","https:\/\/sqlwatch.io\/blog\/","https:\/\/sqlwatch.io\/page\/1\/","https:\/\/sqlwatch.io\/page\/2\/","http:\/\/sqlwatch.io\/blog\/author\/","http:\/\/sqlwatch.io\/blog\/author\/feed\/","http:\/\/sqlwatch.io\/events\/","http:\/\/sqlwatch.io\/events\/feed\/","http:\/\/sqlwatch.io\/events\/data-saturday-albuquerque-2022-tentative-albuquerque-sql-server-user-group\/","http:\/\/sqlwatch.io\/feed\/rdf\/","http:\/\/sqlwatch.io\/feed\/rss\/","http:\/\/sqlwatch.io\/feed\/","http:\/\/sqlwatch.io\/feed\/atom\/","http:\/\/sqlwatch.io\/comments\/feed\/","http:\/\/sqlwatch.io\/events\/data-saturday-albuquerque-2022-tentative-albuquerque-sql-server-user-group\/feed\/","http:\/\/sqlwatch.io\/","http:\/\/sqlwatch.io\/blog\/","http:\/\/sqlwatch.io\/page\/1\/","http:\/\/sqlwatch.io\/page\/2\/"]}
    )
    

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi,
    when posts are created/updated the plugin will always try to purge the cache to ensure the cache has the latest version. On the other hand I don’t know how big your site is and at a single time how many posts are getting created/updated at a single time.

    If there are too many requests it would mean that your site is making a huge amount of requests to Cloudflare API.

    You might try contacting Cloudflare asking them if they can increase the number of API call limits on your zone. I think you are having this problem because you are hitting the number of API request limit on your CF account.

    According to this page: https://support.cloudflare.com/hc/en-us/articles/200171456-How-many-API-calls-can-I-make- it seems normally you can only make 1200 requests per 5 minutes.

    • This reply was modified 3 years, 1 month ago by iSaumya.
    Thread Starter Marcin Gminski

    (@gmmarcin)

    Hi,

    Thanks.

    Yes, the problem is that the site is making 160 requests as 160 posts are being created so the question was how to deal with those and how to exclude this particular set of posts from purging the cache one by one or at all?

    160 posts should not exceed the 1200/5min quota?

    Thanks.

    Plugin Contributor iSaumya

    (@isaumya)

    Inside the plugin settings if you go to the Others tab there is a section “Disable Metabox” which is set to YES by default. Set to to NO.

    Then for each page and post you will see a new option to bypass that page or post from caching so for those posts you can bypass the cache.

    But the best option would be to contact Cloudflare and asking them if they can increase the API call limit on your zone.

    Thread Starter Marcin Gminski

    (@gmmarcin)

    Ok, thank you kindly for your help, much appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Cloudflare] ERROR: Too Many Requests’ is closed to new replies.