A Worker runs out of CPU on real traffic
Signing a JWT per request, parsing a large JSON body, or looping over a cached array that has grown bigger than anyone noticed. The free 10 ms budget disappears quickly.
Hot path inside the budget
Running Cloudflare Workers?
Workers are a different kind of runtime, not a small Node server. The limits on CPU time, bundle size and subrequests are low on purpose, and most of the trouble we see comes from code written as if a Worker were a Lambda or an Express app. We fit the code to the runtime instead of fighting it.
What it is
Cloudflare Workers is a serverless platform that runs JavaScript, TypeScript, Rust compiled to Wasm, and a few other languages on Cloudflare's edge network. Unlike AWS Lambda, Workers use V8 isolates instead of containers, which means cold starts of about five milliseconds and no hot-path timers to tune.
The platform first became generally available in 2018, and the ecosystem has grown around it: Workers KV for eventually-consistent key-value storage, Durable Objects for strongly-consistent stateful compute, R2 for object storage, D1 for SQLite at the edge, and Queues for asynchronous workflows. All of it is deployed through the wrangler CLI and billed on a per-request and CPU-time basis.
The honest version
No technology is all upside. This is where Cloudflare Workers earns its place and where it tends to cause trouble.
Sound familiar?
The Cloudflare Workers problems that bring people to us, and what you have once each one is fixed.
Signing a JWT per request, parsing a large JSON body, or looping over a cached array that has grown bigger than anyone noticed. The free 10 ms budget disappears quickly.
Hot path inside the budget
A dependency pulled in a heavy locale table, an SDK compiled with all providers included, or a polyfill that does not need to be there. Tree-shaking and ESM imports earn their keep.
Bundle slimmed under the cap
An unhandled promise rejection from an upstream fetch, a race against a KV write, or an assumption that a header is always present. Cloudflare returns a generic page and the real cause only lives in tail logs.
Errors surfaced, root cause fixed
A flag flipped in KV and three regions still see the old value a minute later, because KV propagation is eventual and the code treated it as immediate.
Right storage picked per use case
A fan-out over an upstream API that issues a request per item, or an auth flow chaining three services, and the per-request subrequest limit stops the Worker halfway.
Fan-out batched, cap respected
A SQLite-at-the-edge pattern where two Workers write to the same D1 shard at once, serialising into contention. We either shape the writes or move them to Durable Objects.
Concurrent writes handled cleanly
Secrets set from one laptop, environment bindings added through the dashboard, routes wired up by a departed developer. wrangler.toml no longer describes what is actually deployed.
Config back in version control
A Worker on every route when it only needs to run on one, a KV read on every request to a value that never changes, or Durable Objects left running when they could hibernate.
Only the hot path on the edge
What we do
Hand us one Worker that is misbehaving, or the whole wrangler account.
How it works
Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.
We fix the cause, not the symptom. If something is down, getting it back up comes first.
Backups, monitoring, updates and access, so the same problem can't quietly come back.
You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.
Often found together
We work on the whole stack, so the problem can be wherever it actually is.
The usual suspects are JSON parsing of a large payload, a synchronous crypto operation like RSA signing per request, or a loop over data that has grown since the code was written. We profile the hot path with wrangler and move the heavy piece either to a Durable Object, a background queue, or the origin.
Workers if the code lives on the request path, needs to be close to the user, and fits inside the CPU and bundle limits. Lambda if the task is heavier, needs a specific language runtime, or depends on the broader AWS catalogue. The two are not interchangeable and picking the wrong one is one of the most expensive mistakes we see on edge projects.
Only if your application can tolerate a minute of propagation delay between regions. Writes are eventually consistent across the global KV mesh. For sessions that must be strongly consistent, Durable Objects or D1 are the honest answer.
Switch to ESM imports, drop heavy dependencies like moment or a bundled AWS SDK, and inspect the output of wrangler with the --minify flag to see what is actually in the bundle. Polyfills are often the quiet weight. We usually find the cap is comfortable once two or three libraries have been replaced.
The common causes are a missing account ID in wrangler.toml after a repository clone, an auth token that has expired, routes conflicting with another Worker on the zone, or the bundle silently crossing a size limit. The wrangler --log-level debug flag normally surfaces which one it is.
The estimate costs nothing. Send the Worker name and the error you are chasing, and we come back with a scope and a price before we so much as log in.
Free estimate
Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.
Your message is with a real person, and we'll get back to you soon.
Rather talk now? Call us: