• Resolved Gulshan Kumar

    (@thegulshankumar)


    Hello!

    Thank you for developing this plugin. In many ways, it’s far better.

    Occasionally, I am spotting an error message. Ref: screenshot.

    Thanks

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author digitalpoint

    (@digitalpoint)

    I have seen one other user come up with the same throttling error (I’ve never gotten 100% confirmation, but it does seem like Cloudflare has some special API rate limit they they don’t confirm or document when on certain IP blocks). The plugin itself shouldn’t come anywhere remotely close to the documented/standard rate limit for the Cloudflare API (which is 1200 API calls per 5 minutes). The other person that was seeing it was seeing it when they were doing 2 API calls per 5 minutes.

    If you are able to give me some info (like IP your server is on) and/or your hosting company, I could see if I can get a Cloudflare engineer to try and track it down on their end. I know it’s not ideal to post that info publicly here, but if you wanted to send it to me privately, you can start a conversation with me at https://appforcf.com

    Plugin Author digitalpoint

    (@digitalpoint)

    Does your hosting company give you an option to switch servers/IP addresses for your site? Obviously that’s not an ideal long term solution, but if Cloudflare has put a particular server IP address into a secondary rate limit (maybe due to abuse by some other user on the shared server) it may be simpler to just not use that IP for your server vs. trying to coordinate with Cloudflare to change how they treat that IP.

    Plugin Author digitalpoint

    (@digitalpoint)

    Okay, a couple more questions… Does your site have an exorbitant amount of URLs somehow (like a zillion variations of the same thing)? Or a ton of new posts being made very quickly? The screenshot you showed implies it hit an API rate limit when posting a new post (which does purge the cache for various URLs as needed). Another possibility would be if a ton of edits were made (and published in a short period of time). It would be reasonable to have say 50 unique URLs need to be purged each time a post is created/edited. The API rate limit for cache purging unique URLs is 1,000 per minute. So I could see how a bunch of very quick edits could get you up to the 1,000 URLs (remember, it’s URLs and a single post can be displayed on a lot of different URLs).

    Do you recall if you were doing a bunch of edits or adding of posts very quickly?

    Plugin Author digitalpoint

    (@digitalpoint)

    Version 1.7.7 should resolve this for you. Since cache purging individual URLs isn’t something that absolutely *has* to happen, the new version simply ignores any rate limit errors that could come from a ton of edits happening in a very short period of time. Additionally, it’s going to be most likely that something already was just purged so the rate limit error would in all probability be for the same URLs that were just purged a few seconds prior.

    Thread Starter Gulshan Kumar

    (@thegulshankumar)

    Kindly add a Logging option related to API call to eliminate the guess work. I would like to know how many URLs are getting purged with the reason for triggering. May be this helps in the future.

    For now, I will keep eyes on it and see how it goes.

    Thread Starter Gulshan Kumar

    (@thegulshankumar)

    I am using this plugin on large website where 5000+ posts exists. We use Astra theme. It is not clear to me what get purged when. If there is a list, I would like to see and add if anything I find concerning.

    Plugin Author digitalpoint

    (@digitalpoint)

    Not sure it makes sense to build an entire logging mechanism for all the backend API calls (for example there’s 11 API calls just to build the page that shows the settings you can change). Logging that much has the real potential to bloat the site’s database.

    That being said, there is already a WordPress filter in place that would let you hook into the URLs about to be purged (to edit or just to log them if you wanted).

    add_filter('cloudflare_purge_by_url', 'yourFunction');

    That would pass in the URLs it’s about to purge from the cache as well as the postId that triggered the purge (for example through an edit).

    Plugin Author digitalpoint

    (@digitalpoint)

    If you just want to see the logic for how it gathers a list of URLs to purge, you can find that here:

    https://plugins.trac.www.ads-software.com/browser/app-for-cf/tags/1.7.7/src/DigitalPoint/Cloudflare/Base/Pub.php?rev=2988789#L198

    It’s things like the post, the homepage, archives, author pages, feeds, etc. Basically places that the edited post could show up on.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Cloudflare 971’ is closed to new replies.