Production profiling for Workers and Durable Objects: operation guide
Cloudflare explains how to locate expensive functions and memory allocations in deployed Workers and Durable Objects using on-demand profiles and flamegraphs.
- Products
- WorkersDurable Objects
- Source
- Official docsCloudflare Docs
Key points
- CPU profiles locate compute-heavy functions. Heap profiles sample allocations during capture; they are not snapshots of retained memory.
- Keep the deployed version or target object active with representative traffic. Capture observes a loaded isolate; it does not invoke code or replay historical logs.
- In the dashboard, open Observability → Flamegraph for a Worker or a Durable Object instance. Choose CPU or Heap, a version, and 1–50 seconds.
- Cloudflare CLI uses cf workers versions profile with --worker-id and --profile-type cpu or heap. latest means the newest created version, which may not be deployed.
- For a Durable Object, supply its owning Worker and both --namespace-id and --actor-id. Download pprof data for further inspection.
- Wider flamegraph frames indicate more CPU time or allocations, not chronological order. Use Table to compare Self and Total; enable source maps for readable TypeScript names.
Original sources
Last updated
Production profiling for Workers and Durable Objects: operation guide
Open original sourceCloudflare explains how to locate expensive functions and memory allocations in deployed Workers and Durable Objects using on-demand profiles and flamegraphs.
More to read
The free plan wall people miss is CPU time, not request count
风易 (@Michael_liyang) says the Workers Free wall most often missed is the 10 ms CPU time per invocation, which fails the request outright even when the daily quota is not used up; he suggests keeping cron handlers to dispatch only and moving heavy work into small queued steps with progress saved in D1.
maisui: a migration script's recursive R2 listings produced 14.38M Class A operations, about $63; a one-time goodwill credit requested.
Cloudflare Community user maisui says that on November 11–12, 2026, while migrating about 425 GB (1.31M objects) out of an R2 bucket, a script listed the bucket recursively through the S3 API without fast-list; with nearly one object per directory each listing issued about 1.31M Class A operations, and about 11 runs produced 14.38M Class A operations (13.38M billable), about USD 63 on the cycle invoice. The author calls it a one-off script defect, says the usage alert only fired after daily aggregation, has fixed the script and set low billing alerts, and asks for a one-time goodwill credit; the Free plan support portal did not show a Billing case form.
Jonhoni99: Workers AI's 10,000 Neurons per day reset at 8:00 Beijing time, but some models must have a payment method bound first
On 2026-11-13, X user @Jonhoni99 wrote: Cloudflare's 10,000 Neurons are cleared to zero every day at 8:00 Beijing time. The catch is that models such as Kimi K2.6, GLM-5.3, and DeepSeek V4 Pro require a payment method to be bound; the official list has 9, and the free quota cannot be used. On the same day @Nyerishi also pointed out that DeepSeek V4.1 Flash on the Workers AI free plan requires a Workers Paid subscription to actually access it. These are the author's checks against the official catalog, not a bill that has already occurred.