{
  "id": "nginx/client-body-buffer-size-exceeded",
  "signature": "client intended to send too large body: 1048577 bytes exceeds client_body_buffer_size",
  "signature_zh": "客户端请求体大小超过缓冲区限制",
  "regex": "client intended to send too large body: \\d+ bytes exceeds client_body_buffer_size",
  "domain": "nginx",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The request body size exceeds the client_body_buffer_size directive, causing nginx to reject or buffer to disk; if client_body_max_size is also exceeded, nginx returns 413.",
  "root_cause_type": "generic",
  "root_cause_zh": "请求体大小超过client_body_buffer_size指令限制，导致nginx拒绝或缓冲到磁盘；如果同时超过client_body_max_size，nginx返回413。",
  "versions": [
    {
      "version": "nginx 1.18.0",
      "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"
    },
    {
      "version": "nginx 1.24.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Setting to 0 disables buffering entirely, which may cause nginx to use temporary files inefficiently and slow down.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The error specifically mentions client_body_buffer_size; increasing max size alone does not resolve the buffer limit warning.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This may cause nginx to forward the body immediately but can lead to upstream timeouts or resource issues.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase client_body_buffer_size in http, server, or location block:\nclient_body_buffer_size 2m;\nThis allows larger bodies to be buffered in memory.",
      "success_rate": 0.9,
      "how": "Increase client_body_buffer_size in http, server, or location block:\nclient_body_buffer_size 2m;\nThis allows larger bodies to be buffered in memory.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the body size is expected to be large, also increase client_body_max_size:\nclient_body_max_size 10m;\nclient_body_buffer_size 2m;",
      "success_rate": 0.95,
      "how": "If the body size is expected to be large, also increase client_body_max_size:\nclient_body_max_size 10m;\nclient_body_buffer_size 2m;",
      "condition": "",
      "sources": []
    },
    {
      "action": "For specific endpoints, set a higher buffer size only for that location:\nlocation /upload {\n    client_body_buffer_size 4m;\n    client_body_max_size 100m;\n}",
      "success_rate": 0.85,
      "how": "For specific endpoints, set a higher buffer size only for that location:\nlocation /upload {\n    client_body_buffer_size 4m;\n    client_body_max_size 100m;\n}",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Increase client_body_buffer_size in http, server, or location block:\nclient_body_buffer_size 2m;\nThis allows larger bodies to be buffered in memory.",
    "If the body size is expected to be large, also increase client_body_max_size:\nclient_body_max_size 10m;\nclient_body_buffer_size 2m;",
    "For specific endpoints, set a higher buffer size only for that location:\nlocation /upload {\n    client_body_buffer_size 4m;\n    client_body_max_size 100m;\n}"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_buffer_size",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.84,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-09-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}