# multipart.multipart.MultipartParseError: File size exceeded limit

- **ID:** `python/fastapi-upload-file-size`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

上传的文件大小超过了FastAPI或服务器的限制。

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (80% success)
   ```
   配置服务器限制：
# 对于uvicorn，使用--limit-concurrency或设置max_request_size
   ```
2. **** (90% success)
   ```
   在应用层检查文件大小：
file = await request.form()
if file.size > MAX_SIZE:
    raise HTTPException(413)
   ```

## Dead Ends

- **** — 尝试修改客户端请求，但服务器限制未变。 (50% fail)
- **** — 忽略错误，导致连接中断。 (70% fail)
