#CPU time `cpu_ms` not set to custom value using Terraform/OpenTofu

11 messages · Page 1 of 1 (latest)

fringe hornet
#

Hello there,

Since two weeks now, I am trying to set the CPU time cpu_ms of my customer's project to the max limit of 5 minutes (300,000 ms) according to the documentation at https://developers.cloudflare.com/workers/platform/limits/#cpu-time. My customers is on a paid plan for the account and on a the paid plan for the workers.

I have set the value in the wrangler.toml as described, I have set the value manually in the dashboard and I even wrote a curl command to set and check the setting before and after deployment. Unfortunately, I am stuck with settings set to Pages Functions billing: CPU time limit: 50 ms and when I click on the edit button, inside of the text input, the value is correctly set to CPU Time Limit (ms): 300000 and a message is stating This change will take effect on the next deployment.. (Re-)Deploying the worker does not do the trick. Using the API for set this setting neither.

So now I am out of ideas how to solve this and need to request help. My user is linked to the correct Cloudflare account.

Any help or advice are appreciated.
Thank you.

Cloudflare Docs

Cloudflare Workers plan and platform limits.

#

CPU time cpu_ms not set to custom value

gloomy lion
fringe hornet
#

@gloomy lion Can I send you a PM with those sensitive information?

gloomy lion
#

yep

fringe hornet
#

Send the information via PM

gloomy lion
# fringe hornet Send the information via PM

Ok... seems like you got into a bit of a weird state where your project is using Bundled usage model - I just enabled switching off the legacy usage models for your account

You should now see an option to change to "Standard" in settings, this will let you set the CPU limit as you wish

#

Can you try updating that to Standard and doing a new deploy

fringe hornet
#

It worked!
So, in my case, my deployment is based on Terraform/OpenTofu. I checked the Cloudflare provider version in use, which is at v4.44.0 in my case, and searched the documentation for the usage model at this particular version here: https://registry.terraform.io/providers/cloudflare/cloudflare/4.44.0/docs/resources/pages_project#usage_model-1

Turns out, the bundled option is the default and I haven't set this option at all.
Using the proper option usage_model = "standard" for production, the cpu_ms properly applied and the UI is reflecting the setting as expected.

#

CPU time cpu_ms not set to custom value using Terraform/OpenTofu

#

Thanks @gloomy lion to point out the issue 👍 ♥️