{
  "id": "python/starlette-upload-file-size-limit",
  "signature": "starlette.exceptions.HTTPException: 413: Request Entity Too Large",
  "signature_zh": "Starlette 异常：413：请求实体过大",
  "regex": "starlette\\.exceptions\\.HTTPException:\\ 413:\\ Request\\ Entity\\ Too\\ Large",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Uploaded file exceeds the maximum upload size limit set in the server configuration.",
  "root_cause_type": "generic",
  "root_cause_zh": "上传的文件超过服务器配置中设置的最大上传大小限制。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Uvicorn doesn't have a direct setting; you need to configure the ASGI server or use a middleware.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This handles the error but doesn't allow the upload; you need to increase the limit.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.7,
      "how": "Set a custom limit in uvicorn: uvicorn.run(app, limit_max_request_size=1000000) for 1MB",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Use a middleware to check content-length and reject early with a custom message",
      "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.84,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-02-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}