Too many API requests by single worker invocation

Hi, I'm using a cron-triggered worker that makes from 10 to 20 subrequests. It has worked flawlessly for 2 years, but today I got this message "Too many API requests by single worker invocation". I'm using a paid version, unbound. Any idea how to find out what happened? It's a pretty critical cron job so I need to know what's up. Tx.
4 Replies
Hello, I’m Allie!
Are you hitting the CF API, or an external API?
lasseschou
lasseschou17mo ago
The request to the worker itself is using the cron trigger in wrangler.toml. The subrequests consist of quite a few KV gets using KV bindings (maybe around 500 calls), and then there are around 20 external calls. There should be a limit of 1000 subrequests, but is this "internal" KV gets and external calls combined?
Hello, I’m Allie!
The fact that the error is API Requests makes me assume that you are running too many KV API calls...
lasseschou
lasseschou17mo ago
I just added some counters, and I can confirm that I'm reaching the 1000 KV gets, so this makes sense Thanks for helping out
Want results from more Discord servers?
Add your server