403 Forbidden when doing 12k requests/s

For Workers & Pages, what is the name of the domain?

https://doubly-queue-producer.redis-emphatic073.workers.dev

What is the issue or error you’re encountering

I am receiving a 403 Forbidden when performing load tests at a rate of 12k req/s. When testing with less req/s (say 3k req/s) everything works fine. It seems I am hitting some internal limit. Is there a way to disable this safeguard?

What steps have you taken to resolve the issue?

I am also using Queues and KV inside the worker. To ensure the Queues are the issue, I created multiple queues and direct traffic to the queues at random, ensuring none of the queues hit their 5k ops/s limit. I am also using Worker caching for the results I get out of the KV so that I am not hitting that as much either.

So I believe the core issue is simply hitting an internal limit on Workers. I should also note that in the Cloudflare dashboard there are no reported errors in the logs (probably because my code didn’t even run), but under Analytics & Logs > Account Analytics I can see I have 165k 4xx errors. Any help/guidance on how to fix is appreciated!

Note - I am on a paid plan.

**correction: to ensure Queues aren’t the issue

If you are making those requests from a small number of IP addresses, see here…

1 Like

I have done some more testing, and I can now confirm that this is Cloudflare blocking traffic. Logging a request I see the " Sorry, you have been blocked" page.

I am using Grafana K6 Cloud to do this testing, and from what I can see online this is done using a pool of IPs by default.

Is there a way to disable this firewall? I only need to take it down for few minutes so I can perform the tests. I feel like I have clicked on every tab in the dashboard and I cannot see any mention of workers being rate limited by Cloudflare.

The link I posted above tells you how to identify if the requests are triggering anit-abuse detections, and to raise a support ticket if you need limits lifting.

2 Likes

I took a look at the link you posted, but I think the post is outdated. It says “You can also confirm if you have been rate limited by anti-abuse Worker Rate Limiting by logging into the Cloudflare dashboard, selecting your account and zone, and going to Security > Events.” however, I have looked all over the dashboard and cannot see any Security tab anywhere. There is a “Security Center” with submenus “Security Insights”, “Infrastructure”, “Investigate”, and “Blocked Content (new)” but nothing like Events.

The dashboard has had an update, if using the new layout it’s under the zone… Security… Analytics.

Or go here…
https://dash.cloudflare.com/?to=/:account/:zone/security/events

1 Like

I don’t see a “Zone” mentioned anywhere, and when I click on your link I am taken to Account Home > Domains with the “Enter an existing domain” input focused. Is this trying to tell me that I need to setup a custom domain on my worker to view Zone Security settings? (Thank you for helping me! :slight_smile:)

Ah ■■■■, yes, sorry, you are using workers.dev directly. Just go and raise an account support ticket to ask if the anti-abuse Workers Rate Limiting can be disabled for your account due to your load testing.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.