Too many API requests by single worker invocation
# workers-help
l
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.
h
Are you hitting the CF API, or an external API?
l
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?
h
The fact that the error is
API Requests
makes me assume that you are running too many KV API calls...
l
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
31 Views