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

- **ID:** `python/starlette-memory-upload-too-large`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Uploaded file size exceeds server's maximum request body size limit (default 1MB in Starlette).

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   In Starlette, set max request size: app = Starlette(max_request_size=10*1024*1024) # 10MB
   ```
2. **** (85% success)
   ```
   Use streaming upload: async def upload(request):
    async for chunk in request.stream():
        process(chunk)
   ```

## Dead Ends

- **** — Application still enforces its own limit; must configure both. (70% fail)
- **** — Starlette reads entire body into memory before processing; limit applies first. (80% fail)
