# 请求数据过大错误：请求体超过 settings.DATA_UPLOAD_MAX_MEMORY_SIZE。

- **ID:** `python/django-file-upload-too-large`
- **领域:** python
- **类别:** data_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

上传文件大小超过 DATA_UPLOAD_MAX_MEMORY_SIZE 中定义的限制。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.x | active | — | — |

## 解决方案

1. **** (90% 成功率)
   ```
   Increase DATA_UPLOAD_MAX_MEMORY_SIZE = 10485760 (10MB) in settings.py.
   ```
2. **** (85% 成功率)
   ```
   Use streaming uploads or chunked uploads to handle large files.
   ```

## 无效尝试

- **** — Setting DATA_UPLOAD_MAX_MEMORY_SIZE=0 disables the limit but can cause memory exhaustion. (50% 失败率)
- **** — Only increasing FILE_UPLOAD_MAX_MEMORY_SIZE doesn't affect request body limit. (70% 失败率)
