Still getting Exceeded CPU Limits error on paid unbound workers plan
I'm hosting my webapp on CF pages using workers functions. I understand that the hashing when logging in is pretty CPU intensive, so I started paying for the pro workers. I'm using the unbound plan which as I understand just bills me more for higher CPU time, though I'm still getting this error!
9 Replies
Unbound still has a 30 seconds CPU limit
Also make sure the specific worker is in Unbounded. If you set your global preference, this does not update existing workers.
Does the 30 seconds CPU limit also apply to Queue consumers and Cron jobs? I'm getting an Exceeded error after 19 seconds on a queue consumer set to unbounded.
Queue consumers, yes. On cron jobs it depends. From https://developers.cloudflare.com/workers/platform/limits/#cpu-time
On the Unbound billing model, scheduled Workers (Cron Triggers) have different limits on CPU time based on the schedule interval. When the schedule interval is less than 1 hour, a Scheduled Worker may run for up to 30 seconds. When the schedule interval is more than 1 hour, a scheduled Worker may run for up to 15 minutes.
thanks @zegevlier, my cron is set to run once daily, so I presume it qualifies for a 15 minute runtime.
however, I'm still getting a CPU limit exceeded message after just ~19 seconds
Are you sure you're hitting the CPU limit, and not the memory limit?
this is a screengrab of the dashboard. I triggered the worker with a queue, configured for 10 retries.
still getting acquainted with workers, so my understanding could be incorrect, but I'm pretty sure it's CPU limit exceeded.
I'm subscribing to a websocket in my worker, and it works locally without issue
After investigation it seems this was caused by a panic in my wasm. Adding a panic hook allowed me to identify the issue. Now seeing 15 minute executions without any CPU Limit Exceeded warnings.