🐛 BUG: Startup script exceeded CPU time limit
See original GitHub issueWhat version of Wrangler
are you using?
2.1.15
What operating system are you using?
Mac
Describe the Bug
I’m trying to publish an update to an existing worker through wrangler
and running into this error now. The worker is unbounded so it should have a much longer script startup and time limit than the other plan, but it doesn’t seem to make a difference.
I saw on the documentation that a worker’s size is limited to 1 MB after compression, and if thats the case then this should still work since the gzip size is ~930 KiB.
$ wrangler publish
⛅️ wrangler 2.1.15
--------------------
▲ [WARNING] Enabling node.js compatibility mode for built-ins and globals. This is experimental and has serious tradeoffs. Please see https://github.com/ionic-team/rollup-plugin-node-polyfills/ for more details.
Total Upload: 4816.91 KiB / gzip: 929.53 KiB
✘ [ERROR] A request to the Cloudflare API (*******) failed.
Error: Script startup exceeded CPU time limit.
[code: 10021]
If you think this is a bug, please open an issue at:
https://github.com/cloudflare/wrangler2/issues/new/choose
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
After trying with --minify
enabled, the compressed size is even further decreased to ~700 KiB and still fails with the same error.
Issue Analytics
- State:
- Created 10 months ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Exceeds CPU time limit only on first few accesses #95
After a new deployment, I get a "CPU time limit exceeded" error only on the first few accesses. It may be related to...
Read more >Exceeding CPU limit when running wrangler dev on paid ...
I was running into (expected) CPU limit issues on the free tier, so I've upgraded to the Paid tier, with a worker using...
Read more >Apex CPU Time Limit Exceeded? Here's What to Do Next.
Seeing the error “Apex CPU time limit exceeded” means your transaction is taking too long and can't be completed. It's also likely a...
Read more >Eliminating Apex CPU Time Limit Exceeded Errors in ...
The message indicates your transaction is taking too long and, therefore, has been shut down, with all completed and in-process tasks reverted.
Read more >Limiting time and memory consumption of a program in Linux
Without further ado, the 14 kilobyte standalone Perl script that limits a program's CPU time and memory consumption on most Linux systems ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There are no additional scripts, just running via
wrangler publish
Wrangler Toml
Debug Log
As @caass had mentioned it’s not a size issue.