# HTTP 413 upload diagnosis worksheet

Use approved, non-sensitive test files on the real upload route. Record references rather than cookies, tokens, or file contents. Replace every example and blank field with evidence from your system.

## 1. Define the allowed upload

| Field | Your answer |
|---|---|
| Upload purpose and owner | |
| Public hostname, route, method, environment | |
| Approved file types | |
| Approved maximum per file | |
| Approved maximum for the whole request, including multipart overhead | |
| Expected number of files and form fields | |
| Current user-facing error text | |

## 2. Capture two controlled requests

| Test | File count / type / file bytes | Whole request bytes, if known | Time and timezone | HTTP status and substatus | Request ID / relevant log reference | Result |
|---|---|---|---|---|---|---|
| Clearly smaller allowed upload | | | | | | |
| Failing upload near the suspected limit | | | | | | |

If a response includes `Retry-After`, record it and check whether the restriction is temporary. If the status is not 413, investigate that actual response; do not label every failed upload a 413.

## 3. Locate the rejecting checkpoint

List only components present on this route. A missing application log entry alone does not prove edge rejection.

| Checkpoint | Present? | Effective limit / setting | Matching evidence | Owner | Decision |
|---|---|---|---|---|---|
| CDN or edge | | | | | |
| NGINX, Apache, IIS, or other web server / proxy | | | | | |
| Application / runtime (including PHP, if used) | | | | | |
| Storage or downstream processing, checked separately | | | | | |

For PHP, a `post_max_size` exceedance can empty `$_POST` and `$_FILES`; it does not by itself establish an HTTP 413. For IIS, retain the exact logged status and substatus.

## 4. Choose a bounded remedy

- [ ] Use a smaller, still-readable approved file and keep the existing limit.
- [ ] Align the applicable upload-route body limits with the approved whole-request ceiling; leave room for multipart overhead below that ceiling when setting per-file limits.
- [ ] Use a separately approved upload architecture because a provider-controlled cap cannot be changed here.
- [ ] Hold the change because the rejecting layer or allowed maximum is not yet established.

Proposed maximum and scope: __________  Technical owner: __________  Change record: __________

Keep authorization, file-type validation, processing limits, and storage safeguards. Do not disable size limits globally to make one file pass.

## 5. Verify and close

- [ ] An allowed file finishes through the public hostname and appears in the intended destination.
- [ ] A safe file above the approved limit is rejected clearly, without a partially published asset.
- [ ] Multi-file forms are checked against both per-file and whole-request limits.
- [ ] Logs and response status at the changed checkpoint match the expected behavior.
- [ ] If the change fails, the previous setting and owner are recorded for rollback.

Decision: **RELEASE / HOLD / ROLLBACK** __________  Date: __________  Evidence location: __________
