Skip to content
!
Glitchary
the field guide to failure
413 Content Too Large6 troubleshooting steps3 sources linked

HTTP error 413: find the upload limit rejecting the request

A 413 means the request body exceeds an accepted limit. Try a smaller upload, then check the CDN, web server and application limits if you operate the site.

By Glitchary · Updated · 3 min read

The short version

  1. 01Compare a smaller file of the same supported type to check whether size is the trigger.
  2. 02Reduce upload size or use the site's documented method for larger files.
  3. 03Split a batch only when the service supports separate requests for that operation.
  4. 04Identify which serving layer returned 413 before changing configuration.
  5. 05Set an appropriate finite body limit at the relevant proxy, server and application layers.
  6. 06Retest the intended upload through the public URL and verify that the file was accepted.

Raw message

413 Content Too Large
413 Payload Too Large
413 Request Entity Too Large

Likely causes

  • An upload or request body exceeds the server's configured size limit.
  • A proxy or CDN rejects the body before it reaches the application.
  • A route-specific body limit differs from the setting changed elsewhere.
  • A batch includes more content than the endpoint permits in one request.

Three common names for the same size error

Content Too Large is the current name; Payload Too Large and Request Entity Too Large are also used for 413. The size being rejected is the request content, commonly a file upload or batch body. The code does not state a universal maximum.

A server may terminate the transfer instead of accepting the whole upload. Waiting helps only when the service indicates a temporary restriction, potentially with Retry-After. The same oversized body remains oversized after an ordinary retry.

If you are uploading a file

Our first test is a smaller file of the same supported format. If the smaller upload works, compare the site's published limit with the failing upload. Resize or export a smaller copy when suitable, keeping the original. Use a documented large-file route if the service offers one.

Changing a filename extension does not reduce its contents. Splitting a document or batch is useful only if the receiving workflow supports separate parts. If the published limit should allow the file, report the size, file type and time to the site owner.

If you maintain the upload endpoint

Trace the rejecting layer before increasing a limit. Cloudflare documents both plan-dependent upload limits and a zone setting that can lower the maximum. Check the current configuration and plan documentation; do not assume an application-level change overrides the CDN.

For NGINX, client_max_body_size sets the permitted body size and can appear at http, server or location scope. Check the effective scope for the failing URL. Set a finite value that meets the upload requirement; zero disables the check and is not required merely to allow a larger file.

Our verification sequence is to retry a supported small upload, then the intended larger upload through the public route. Confirm the stored result. An origin-only success has not tested a stricter intermediary in front of it.

Sources and review notes

Checked on . Based on MDN, NGINX and Cloudflare documentation. Limits vary by service and configuration; file comparisons are editorial diagnostics. This page covers all three common 413 reason phrases.

Tags

http413content-too-largepayload too largerequest entity too largeuploadnginxcloudflare