{
  "id": "nginx/client-body-buffer-overflow",
  "signature": "client intended to send too large body: body size exceeds client_body_buffer_size",
  "signature_zh": "客户端试图发送过大的请求体：请求体大小超过 client_body_buffer_size",
  "regex": "client intended to send too large body",
  "domain": "nginx",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "Nginx buffers the request body to a temporary file when it exceeds client_body_buffer_size, but if the body is too large and client_max_body_size is not properly set, the connection is rejected.",
  "root_cause_type": "generic",
  "root_cause_zh": "Nginx 在请求体超过 client_body_buffer_size 时将其缓冲到临时文件，但如果请求体过大且 client_max_body_size 未正确设置，连接会被拒绝。",
  "versions": [
    {
      "version": "nginx 1.24.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "nginx 1.22.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "nginx 1.20.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "client_body_buffer_size only controls in-memory buffering; client_max_body_size is the actual limit.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This can cause upstream servers to receive partial data and may break applications that expect full body.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "proxy_buffer_size is for response headers, not request bodies.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase client_max_body_size in http, server, or location block to allow larger bodies: `client_max_body_size 50M;`",
      "success_rate": 0.9,
      "how": "Increase client_max_body_size in http, server, or location block to allow larger bodies: `client_max_body_size 50M;`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Ensure client_body_buffer_size is set appropriately (e.g., 128k) and that the system has enough disk space for temporary files in the path defined by client_body_temp_path.",
      "success_rate": 0.8,
      "how": "Ensure client_body_buffer_size is set appropriately (e.g., 128k) and that the system has enough disk space for temporary files in the path defined by client_body_temp_path.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Check the actual body size in logs and set client_max_body_size accordingly. For file uploads, ensure the frontend sends the correct Content-Length header.",
      "success_rate": 0.85,
      "how": "Check the actual body size in logs and set client_max_body_size accordingly. For file uploads, ensure the frontend sends the correct Content-Length header.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Increase client_max_body_size in http, server, or location block to allow larger bodies: `client_max_body_size 50M;`",
    "Ensure client_body_buffer_size is set appropriately (e.g., 128k) and that the system has enough disk space for temporary files in the path defined by client_body_temp_path.",
    "Check the actual body size in logs and set client_max_body_size accordingly. For file uploads, ensure the frontend sends the correct Content-Length header."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-01-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}