Cloudflare Error 1102: Worker exceeded resource limits (CPU time / memory)

The Worker used more CPU time or memory than its plan allows for a single request.

Seen on: Cloudflare

Meaning

Free plan Workers get 10 ms CPU per request; paid plans allow more (configurable). Heavy parsing, crypto, large JSON, image work or memory over 128 MB trigger 1102.

Common causes

  • CPU-heavy processing (JSON, regex, crypto)
  • Memory over 128 MB (large buffers)
  • Free plan CPU limit

⚡ Quick fix

  1. Profile and optimise hot code
  2. Stream instead of buffering
  3. Upgrade/raise the CPU limit (limits.cpu_ms on paid plans)

Detailed fix by platform

TOML

  1. bash
    # wrangler.toml (Workers Paid)
    [limits]
    cpu_ms = 50

How to diagnose

  1. Metrics — CPU time per invocation (dashboard)
  2. Memory — Large in-memory data?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.