{
  "id": "python/fastapi-file-upload-too-large",
  "signature": "fastapi.exceptions.HTTPException: 413: Request Entity Too Large",
  "signature_zh": "fastapi.exceptions.HTTPException: 413：请求实体过大",
  "regex": "fastapi\\.exceptions\\.HTTPException:\\ 413:\\ Request\\ Entity\\ Too\\ Large",
  "domain": "python",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "The uploaded file exceeds the server or reverse proxy body size limit (e.g. nginx client_max_body_size).",
  "root_cause_type": "generic",
  "root_cause_zh": "上传文件超过服务器或反向代理的请求体大小限制（如 nginx client_max_body_size）。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "FastAPI has no built-in limit; the block is at nginx/gunicorn.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Same payload will always exceed the limit.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.92,
      "how": "client_max_body_size 50m;",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "async for chunk in request.stream():\n    await save_chunk(chunk)",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.83,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-09-27",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}