{
  "id": "api/rest-api-request-body-too-large-streaming",
  "signature": "413 Payload Too Large: Request entity too large, max size is 1048576 bytes",
  "signature_zh": "413 负载过大：请求实体过大，最大大小为 1048576 字节",
  "regex": "413 Payload Too Large: Request entity too large, max size is [0-9]+ bytes",
  "domain": "api",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "The HTTP request body exceeds the server-configured maximum payload size limit, typically for file uploads or large JSON payloads.",
  "root_cause_type": "generic",
  "root_cause_zh": "HTTP 请求体超过了服务器配置的最大负载大小限制，通常用于文件上传或大型 JSON 负载。",
  "versions": [
    {
      "version": "HTTP/1.1 RFC 7231",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Nginx 1.24",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Express.js 4.18",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Compressing the request body (e.g., gzip) may not reduce size below the limit if the server counts uncompressed bytes.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Splitting the request into multiple smaller requests without proper sequencing may cause data inconsistency or missing data.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Reduce the payload size by removing unnecessary fields or using pagination. Example: send data in chunks with a multipart upload or use chunked transfer encoding: curl -X POST https://api.example.com/upload -H 'Transfer-Encoding: chunked' -d @largefile.json",
      "success_rate": 0.9,
      "how": "Reduce the payload size by removing unnecessary fields or using pagination. Example: send data in chunks with a multipart upload or use chunked transfer encoding: curl -X POST https://api.example.com/upload -H 'Transfer-Encoding: chunked' -d @largefile.json",
      "condition": "",
      "sources": []
    },
    {
      "action": "Increase the server-side max payload size limit (if you control the server). Example (Nginx): client_max_body_size 10m; (Express.js): app.use(express.json({limit: '10mb'}));",
      "success_rate": 0.8,
      "how": "Increase the server-side max payload size limit (if you control the server). Example (Nginx): client_max_body_size 10m; (Express.js): app.use(express.json({limit: '10mb'}));",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "通过移除不必要的字段或使用分页来减小负载大小。示例：使用分块上传或分块传输编码发送数据：curl -X POST https://api.example.com/upload -H 'Transfer-Encoding: chunked' -d @largefile.json",
    "增加服务器端最大负载大小限制（如果您控制服务器）。示例 (Nginx)：client_max_body_size 10m; (Express.js)：app.use(express.json({limit: '10mb'}));"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/413",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-02-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}