{
  "id": "nginx/upstream-sent-too-big-header-while-reading-response-header",
  "signature": "upstream sent too big header while reading response header from upstream",
  "signature_zh": "上游在读取响应头时发送了过大的头",
  "regex": "upstream sent too big header while reading response header from upstream",
  "domain": "nginx",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The upstream server sends HTTP response headers that exceed the proxy_buffer_size or large_client_header_buffers limit, often due to large cookies or custom headers.",
  "root_cause_type": "generic",
  "root_cause_zh": "上游服务器发送的HTTP响应头超过了proxy_buffer_size或large_client_header_buffers的限制，通常由大型cookie或自定义头引起。",
  "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.22.1",
      "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"
    },
    {
      "version": "nginx 1.25.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "proxy_buffer_size must be increased in the server/location context; also proxy_buffers number may need adjustment.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This controls client headers, not upstream response headers; it's irrelevant.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The issue is on the upstream server side, not client side; cache clearing doesn't help.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase proxy_buffer_size to 8k or more in the location block: proxy_buffer_size 8k; proxy_buffers 8 8k;",
      "success_rate": 0.85,
      "how": "Increase proxy_buffer_size to 8k or more in the location block: proxy_buffer_size 8k; proxy_buffers 8 8k;",
      "condition": "",
      "sources": []
    },
    {
      "action": "Optimize upstream application to reduce header size, e.g., limit cookie size or remove unnecessary custom headers",
      "success_rate": 0.75,
      "how": "Optimize upstream application to reduce header size, e.g., limit cookie size or remove unnecessary custom headers",
      "condition": "",
      "sources": []
    },
    {
      "action": "Set proxy_buffering off as a last resort: proxy_buffering off; (increases memory but bypasses buffer limit)",
      "success_rate": 0.6,
      "how": "Set proxy_buffering off as a last resort: proxy_buffering off; (increases memory but bypasses buffer limit)",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在location块中将proxy_buffer_size增加到8k或更大：proxy_buffer_size 8k; proxy_buffers 8 8k;",
    "优化上游应用以减少头部大小，例如限制cookie大小或移除不必要的自定义头部",
    "作为最后手段关闭proxy_buffering：proxy_buffering off;（增加内存但绕过缓冲区限制）"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "http://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.87,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-08-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}