413
MediumWeb Server

Content Too Large — the request body is larger than the server allows

What 413 Means

The 413 error on the HTTP Status-Codes indicates content too large — the request body is larger than the server allows. This typically occurs due to uploading an exceptionally large video or image file.

A 413 Content Too Large response indicates that the server is refusing to process the request because the request payload exceeds the configured maximum size limit. Servers often use this to protect against denial-of-service attacks or disk exhaustion.

Technical Background

The 413 status is fundamentally about capacity protection. Web architecture relies on boundaries to prevent single massive requests from monopolizing memory buffers or exhausting the available temporary storage of an application framework.

In many cases, the backend application itself never generates the 413. Instead, a reverse proxy or load balancer interrupts the data stream and rejects the transmission at the edge to preserve system performance.

Servers may optionally include a Retry-After header with a 413 response. This is generally used in temporary throttling scenarios to indicate when the client might be allowed to retry the large submission.

Common Causes

  • Uploading an exceptionally large video or image file
  • Sending bulk API payload data exceeding allowed chunk limits
  • Nginx client_max_body_size directive is exceptionally restrictive
  • Exceeding strict proxy limits on maximum request body size

Typical Scenarios

  • A user attempts to upload a raw 4K video file to a system designed for small profile pictures
  • A developer mistakenly posts a multi-gigabyte JSON dataset to a simple analytics API
  • An Nginx reverse proxy blocks an upload before it reaches the backend application

What to Know

A 413 is almost always tied to explicit configuration thresholds. For developers, encountering this means a server limit like client_max_body_size must be raised, or the client application must implement data chunking to stream the payload in manageable segments.

Frequently Asked Questions

Common questions about HTTP 413 error

You must either reduce the size of the file you are trying to upload, or the server administrator must increase the maximum allowed request body size in the configuration limits.

Yes. Older specifications referred to it as Payload Too Large or Request Entity Too Large, but the modern RFC simply names it Content Too Large.

No. A 413 specifically refers to the request body payload. If headers or cookies are too large, the server will usually return a 431 or 494 error instead.