Exceeded CPU Time Limits
We have a problem with a worker that handles batch prediction on Azure using setTimeout to wait for the data to be processed (https://www.npmjs.com/package/@dn-institute/cloudflare-workers-batch-prediction). We are getting "Exceeded CPU Time Limits" errors on jobs that take longer than 15 minutes of Wall Time. This is a cron-triggered hourly worker on a paid plan, and the CPU times for the worker do not exceed 50ms. The errored runs show 6ms of CPU Time and 15 minutes of Wall Time. It looks as if the 15-minute limit is being applied to Wall Time instead of CPU Time. Any advice on where to look next is highly appreciated!
3 Replies
https://developers.cloudflare.com/workers/platform/limits/#worker-limits
Cron triggers have a 15 min duration limit
I'd recommend Queues or Workflows for these kinda long running tasks
Thanks @Walshy , didn't notice that duration limit note for the cron triggers. I'll rewrite the library to use something else.
We also have resources issues with cron triggers because often we get to "Exceeded Resources" error and the observability of cron triggers is poor. How to figure out which resource is exceeded?
Should we ask to raise the limit?
If we migrate to workflow, what is the path for that?