Scheduled Worker - Unexpected 429s

Hi, we're having an issue with cron scheduled worker invocations (scheduled()) where some of our outbound fetch calls to external APIs are intermittenly getting rate limited (429s) or forbidden (403) responses . We only make one request to these endpoints every 15 minutes, so my only guess is that this is due to other scheduled workers sharing infrastructer / egress IPs? Can someone confirm and provide guidance?
2 Replies
Jerico Aragon
Jerico Aragon2mo ago
???
Alex
AlexOP2mo ago
Happy to provide any more information... I was handling the 429s errors in the code, so the worker and event "succeeded". Wondering if that prevents cycling out to different infra? I changed it now to let the cron events fail... so far 3 failures in a row so no cycling of my worker. Ok, this is now a larger question... Given a relatively small pool of egress IP addresses used by CF, is the assumption that any sufficiently known third-party API that implements IP-based rate limiting is basically unusable from Worker functions? At least and especially scheduled workers, which probably run on a much smaller subset of machines / IPs? Ok. An update - When I deploy with a cron trigger defined in wrangler.toml , the handler worker hits 429s every time - tried both * /15 * * * * and * /17 * * * * and it errors out on every invocation for hours... but if I then manually edit the cron trigger in the dashboard, it goes through without a problem.

Did you find this page helpful?