hi, i trying to set the cpu ms limit for
hi, i trying to set the cpu ms limit for the worker that run as consumer of a queueu, based on the documentation, it suppose can set a max limit of 15 minutes of cpu run limit, but when i try to set via wrangler or even using the dashboard, both i got is max 30,000 ms only
5 Replies
refer to the screenshot, the worker is just handler for queue and when i try deploy it via wrangler, it just thrown this error, 300,000 ms is just 5 minutes, not yet hit 15 minutes max
even if i set it to timeout on 30,000 (30 sec), the consumer worker doesnt really throw error say cpu ms limit hit and kill the process, it still keep running pass over 30 second
hey! our error message here isn't very clear, but these docs should clear it up:
https://developers.cloudflare.com/workers/platform/limits/#worker-limits
The max cpu time is 30s (except for cron triggers). The max duration is 15 minutes for Queue consumers, but normal workers don't have any real limits
So if you're setting a max CPU limit, it is 30,000 ms (or 30s) max
Workers can occasionally go over that 30s limit, but if this happens frequently, the execution of your worker will be terminated at the 30s mark (documented here)