What happens when the CPU Time is more than 10ms?

Hi there,

Cloudflare analytics show Median CPU Time of 8ms. I am on free plan if the cpu time is more than 10ms does that means it simply failed.

What exactly happens if it took more than 10ms? does the worker quit exactly at 10ms?

I am using worker to deliver form from website.

Thanks


After 10 milliseconds of CPU time on the free plan, your worker will quit and throw a 1102 error. CPU Runtime docs

1 Like

Hi @Cyb3r-Jak3

Since the user who is submitting the form will see an error but how can i check in my account, how many 1102 error have occured this month/week?

Thanks

You would see all errors under the worker summary section

2 Likes

Hi @Cyb3r-Jak3

I see no errors in this section it show 100% success If i see this week i see “median CPU time” 5ms if i see last 24 hours i see 8ms. To get 8ms it has to be some response times over 10ms to average from 5ms to 8ms.

Can i set notification for these errors. and why the same worker take sometimes 4ms and sometime 8ms it is running the same code to submit the form?

thanks

It likely depends on what they are submitting in the form itself (longer text etc).

You can actually go over 10ms for a brief period of time (they allow small bursts over 10ms) but if it goes beyond that then you will be shut down as said.

1 Like

Hi @mcfadyeni

Thanks for explaining this. My issue is i am unsure if i can see reliably if the workers fail. As there is a possibility the users might be unable to submit the form while i have no idea of the failed attempts.

Thanks

You will see it appear in the Workers dashboard under Exceeded CPU Limits (the purple line on the image sent by @Cyb3r-Jak3 above)

Hi @mcfadyeni

I am not so sure or comfortable with worker reporting. As i see for example 18 successful requests while i only receive 1 form message.

Thanks

Are you using ReCAPTCHA or Turnstile?

If so, those 17 requests could just be requests that failed bot verification and didn’t have an email sent.

Hi @mcfadyeni

I am using hcaptcha. I am bit disapointed why there are no details on the requests which can show more details about success and failed request. i am not sure if this option is already there, but i am unable to locate such details.

Thanks

It’s on the chart as shown above.

You don’t automatically get killed at 10ms. I have a worker that takes 400-800ms per request, and developing it on a free plan I never once saw it get killed. You’ll be first in line to get killed, and you can’t rely on it, and obviously I run that on a paid plan, but it’s not a 100% hard limit.