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

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
Limits
Cloudflare Workers plan and platform limits.
9 Replies
Walshy
Walshy5mo ago
Hey, which Pages project is this?
Stephan Koglin-Fischer
@Walshy | DevPlat EE Can I send you a PM with those sensitive information?
Walshy
Walshy5mo ago
yep
Stephan Koglin-Fischer
Send the information via PM
Walshy
Walshy5mo ago
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
No description
Walshy
Walshy5mo ago
Can you try updating that to Standard and doing a new deploy
Stephan Koglin-Fischer
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.
Stephan Koglin-Fischer
Thanks @Walshy | DevPlat EE to point out the issue 👍 ♥️
Walshy
Walshy5mo ago
Interesting, glad you got it sorted!

Did you find this page helpful?