{
  "id": "nginx/proxy-request-body-too-large-for-buffering",
  "signature": "proxy request body too large for buffering",
  "signature_zh": "代理请求体过大，无法缓冲",
  "regex": "proxy request body too large for buffering",
  "domain": "nginx",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The upstream server expects a Content-Length header, but the request body exceeds proxy_buffer_size and buffering is disabled, causing nginx to fail to forward the request.",
  "root_cause_type": "generic",
  "root_cause_zh": "上游服务器期望 Content-Length 头部，但请求体超过 proxy_buffer_size 且缓冲被禁用，导致 nginx 无法转发请求。",
  "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_max_body_size only limits the client request body size; the proxy buffer error is about how nginx forwards the body to upstream.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Disabling buffering forces nginx to hold the entire body in a single buffer; if the body exceeds proxy_buffer_size, the error persists.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "proxy_buffering controls response buffering from upstream, not request body buffering to upstream.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase proxy_buffer_size to accommodate the expected request body size, e.g., add 'proxy_buffer_size 8k;' or larger in the location or http block.",
      "success_rate": 0.85,
      "how": "Increase proxy_buffer_size to accommodate the expected request body size, e.g., add 'proxy_buffer_size 8k;' or larger in the location or http block.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Enable proxy request buffering by setting 'proxy_request_buffering on;' (default) and ensure proxy_buffer_size is at least the size of typical request bodies.",
      "success_rate": 0.9,
      "how": "Enable proxy request buffering by setting 'proxy_request_buffering on;' (default) and ensure proxy_buffer_size is at least the size of typical request bodies.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the upstream can handle chunked transfer encoding, disable the Content-Length requirement by adding 'proxy_http_version 1.1;' and 'proxy_set_header Connection \"\";' to allow chunked requests.",
      "success_rate": 0.75,
      "how": "If the upstream can handle chunked transfer encoding, disable the Content-Length requirement by adding 'proxy_http_version 1.1;' and 'proxy_set_header Connection \"\";' to allow chunked requests.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Increase proxy_buffer_size to accommodate the expected request body size, e.g., add 'proxy_buffer_size 8k;' or larger in the location or http block.",
    "Enable proxy request buffering by setting 'proxy_request_buffering on;' (default) and ensure proxy_buffer_size is at least the size of typical request bodies.",
    "If the upstream can handle chunked transfer encoding, disable the Content-Length requirement by adding 'proxy_http_version 1.1;' and 'proxy_set_header Connection \"\";' to allow chunked requests."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffer_size",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2024-03-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}