{
  "id": "api/api-gateway-request-too-large",
  "signature": "413 Request Entity Too Large: Request size exceeds the maximum allowed limit for the API Gateway.",
  "signature_zh": "413 请求实体过大：请求大小超过API网关允许的最大限制。",
  "regex": "413.*Request Entity Too Large|413.*payload too large",
  "domain": "api",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "HTTP request body or headers exceed the size limit configured on the API gateway (e.g., AWS API Gateway 10MB, NGINX 1MB).",
  "root_cause_type": "generic",
  "root_cause_zh": "HTTP请求体或头部超过API网关配置的大小限制（如AWS API Gateway 10MB，NGINX 1MB）。",
  "versions": [
    {
      "version": "AWS API Gateway REST API",
      "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": "Azure API Management",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Increasing client-side timeout without reducing payload size does not resolve the 413 error, as the gateway rejects the request before it reaches the backend.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Adding compression headers (e.g., gzip) but sending uncompressed large payload still triggers the limit because the gateway checks raw size before decompression.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase the maximum request size on the gateway. For NGINX: add 'client_max_body_size 20M;' in the http or server block. For AWS API Gateway, increase the payload limit to 10MB (maximum) or use binary media types.",
      "success_rate": 0.9,
      "how": "Increase the maximum request size on the gateway. For NGINX: add 'client_max_body_size 20M;' in the http or server block. For AWS API Gateway, increase the payload limit to 10MB (maximum) or use binary media types.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Split large payloads into chunks using multipart upload or paginated API calls. Example: POST /upload with 'Content-Range: bytes 0-1048575/5242880' header.",
      "success_rate": 0.8,
      "how": "Split large payloads into chunks using multipart upload or paginated API calls. Example: POST /upload with 'Content-Range: bytes 0-1048575/5242880' header.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a direct upload to cloud storage (e.g., S3 presigned URL) and pass only the reference (URL) in the API request.",
      "success_rate": 0.85,
      "how": "Use a direct upload to cloud storage (e.g., S3 presigned URL) and pass only the reference (URL) in the API request.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Increase the maximum request size on the gateway. For NGINX: add 'client_max_body_size 20M;' in the http or server block. For AWS API Gateway, increase the payload limit to 10MB (maximum) or use binary media types.",
    "Split large payloads into chunks using multipart upload or paginated API calls. Example: POST /upload with 'Content-Range: bytes 0-1048575/5242880' header.",
    "Use a direct upload to cloud storage (e.g., S3 presigned URL) and pass only the reference (URL) in the API request."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-known-issues.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.89,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-11-08",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}