# fastapi.exceptions.HTTPException: 413: Request Entity Too Large

- **ID:** `python/fastapi-file-upload-too-large`
- **Domain:** python
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The uploaded file exceeds the server or reverse proxy body size limit (e.g. nginx client_max_body_size).

## Version Compatibility

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

## Workarounds

1. **** (92% success)
   ```
   client_max_body_size 50m;
   ```
2. **** (85% success)
   ```
   async for chunk in request.stream():
    await save_chunk(chunk)
   ```

## Dead Ends

- **** — FastAPI has no built-in limit; the block is at nginx/gunicorn. (90% fail)
- **** — Same payload will always exceed the limit. (85% fail)
