CPU time Go further than the limit.

The CPU time 99th percentile continued to be 3500, so I set the limit, but it did not change. I redeployed it several times and waited, but stilled it still didn't change.
No description
No description
8 Replies
Chaika
Chaika4mo ago
how many requests are you getting? the cpu limit is pretty soft
언블베
언블베4mo ago
Currently 3K in 24 hours
Chaika
Chaika4mo ago
yea, that's what, like 2 a minutes? too low, there's a full explanation of how those cpu limits work here: https://discord.com/channels/595317990191398933/1204401951026974780/1204805369658867752 by the tech lead of Workers key part being
Because of the initial time, if your worker commonly executes only a small number of requests per isolate*, it is indeed possible to exceed the limit regularly. But if you get enough traffic that individual isolates are commonly handling many requests, you'll start to see errors.
Isolates are how CF runs your worker code, people are randomly routed to a metal/machine in each Cf data center and spin up an isolate (if one doesn't already exist). That isolate gets a ton of initial time, enough so that as you can see, you can fly way over the limit on some requests
언블베
언블베4mo ago
Ok, thanks! by the way, is percentile that high because request is low or is just because my code?
Chaika
Chaika4mo ago
your code is really slow 3.5 seconds of cpu time p99 is crazy, must be some specific path that is super slow
언블베
언블베4mo ago
So I guess there must be something causing something like infinite loop in my code. Thanks again!
Chaika
Chaika4mo ago
wouldn't think infinite loop, else it would error just something super slow maybe a dependency or something hidden from you
언블베
언블베4mo ago
I think it's probably because of the PNG metadata parser I created myself (I couldn't find a good metadata parser that can be used in CF Worker.)
Want results from more Discord servers?
Add your server