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](https://cdn.answeroverflow.com/1239946968562929684/image.png)
![No description](https://cdn.answeroverflow.com/1239946968864784478/image.png)
8 Replies
how many requests are you getting?
the cpu limit is pretty soft
Currently 3K in 24 hours
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
Ok, thanks! by the way, is percentile that high because request is low or is just because my code?
your code is really slow
3.5 seconds of cpu time p99 is crazy, must be some specific path that is super slow
So I guess there must be something causing something like infinite loop in my code. Thanks again!
wouldn't think infinite loop, else it would error
just something super slow
maybe a dependency or something hidden from you
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.)