{
  "id": "policy/cloudflare-worker-memory-limit-exceeded",
  "signature": "Error: Worker exceeded memory limits. Memory used: 128 MB, Memory limit: 128 MB",
  "signature_zh": "错误：Worker超出内存限制。已用内存：128 MB，内存限制：128 MB",
  "regex": "Worker exceeded memory limits\\. Memory used: \\d+ MB, Memory limit: 128 MB",
  "domain": "policy",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "Cloudflare Workers have a 128 MB memory limit per request; the worker attempted to allocate more than available, causing termination.",
  "root_cause_type": "generic",
  "root_cause_zh": "Cloudflare Workers每个请求有128 MB内存限制；worker尝试分配超过可用内存，导致终止。",
  "versions": [
    {
      "version": "Cloudflare Workers runtime 2024-01-01",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "wrangler 3.50.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Increase the memory limit in wrangler.toml",
      "why_fails": "Cloudflare Workers memory limit is fixed at 128 MB per request for all plans; cannot be increased.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "Enable auto-scaling to use more memory",
      "why_fails": "Workers don't support auto-scaling per request; each request is isolated and limited to 128 MB.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Optimize memory usage by streaming large responses instead of buffering. Example: use response.body.pipeTo(writable) instead of reading entire body into memory.",
      "success_rate": 0.8,
      "how": "Optimize memory usage by streaming large responses instead of buffering. Example: use response.body.pipeTo(writable) instead of reading entire body into memory.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Split the worker into multiple smaller workers that handle different parts of the request, reducing per-request memory footprint.",
      "success_rate": 0.7,
      "how": "Split the worker into multiple smaller workers that handle different parts of the request, reducing per-request memory footprint.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "通过流式处理大响应而不是缓冲来优化内存使用。示例：使用response.body.pipeTo(writable)而不是将整个主体读入内存。",
    "将worker拆分为多个较小的worker，处理请求的不同部分，减少每个请求的内存占用。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developers.cloudflare.com/workers/platform/limits/",
  "official_doc_section": null,
  "error_code": "1102",
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.75,
  "resolvable": "true",
  "first_seen": "2024-01-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}