and its still running out of cpu time

and its still running out of cpu time
16 Replies
Unknown User
Unknown User11mo ago
Message Not Public
Sign In & Join Server To View
Pato
Pato11mo ago
yes
Unknown User
Unknown User11mo ago
Message Not Public
Sign In & Join Server To View
Pato
Pato11mo ago
the thing is that Im running it on a cron and need to be run every month
Unknown User
Unknown User11mo ago
Message Not Public
Sign In & Join Server To View
Pato
Pato11mo ago
how can i do that
Erisa
Erisa11mo ago
If you mean how can you reach out officially, here: https://dash.cloudflare.com/?to=/:account/support
Pato
Pato11mo ago
what i need to is, i have a list of ids, the using those ids i need to run some calculations (heavy) and then send an email\ even using batching, the worker runs out of cpu time thanks! can you help to white board really quick how could I do this? @Sid | R2
Unknown User
Unknown User11mo ago
Message Not Public
Sign In & Join Server To View
Pato
Pato11mo ago
i see, thanks!
kian
kian11mo ago
Just to clarify, is it memory limits or CPU limits you’re hitting?
Pato
Pato11mo ago
cpu limits i manage to pin point this problem to this
Error: Too many subrequests.
at checkedFetch (worker.js:60:23)
at getAccountStatementAll (worker.js:16395:30)
at sendAllClientsAccountStatement (worker.js:16434:29)
at handleSendAllClientsAccountStatement (worker.js:16496:15)
at async handle (worker.js:12065:33)
at async Object.handle (worker.js:12065:33) {
stack: Error: Too many subrequests.
at checkedFetch (…)
at async Object.handle (worker.js:12065:33),
message: Too many subrequests.
}
Error: Too many subrequests.
at checkedFetch (worker.js:60:23)
at getAccountStatementAll (worker.js:16395:30)
at sendAllClientsAccountStatement (worker.js:16434:29)
at handleSendAllClientsAccountStatement (worker.js:16496:15)
at async handle (worker.js:12065:33)
at async Object.handle (worker.js:12065:33) {
stack: Error: Too many subrequests.
at checkedFetch (…)
at async Object.handle (worker.js:12065:33),
message: Too many subrequests.
}
kian
kian11mo ago
An Unbound Worker can make 1,000 subrequests per invocation
Pato
Pato11mo ago
Yeah is probably making a lot more than that Is there a way to check exactly how many is it making? And how would be a way to work around this? I don’t think batching would help with subrequests right? Because its the same invocation
kian
kian11mo ago
Use Service Bindings to invoke the Worker which will have a refreshed subrequest limit i.e have a Worker to get the IDs, and then it batches them & sends the batch of IDs to a Service Binding Worker that can process them
Pato
Pato11mo ago
Ohh that’s perfect! And i guess i can have multiple workers that process this requests? Or is the same as batching them to a new worker?