4xx

413 Content Too Large

The request body is larger than the server is willing to process.

What is HTTP 413?

This status code, previously known as 'Request Entity Too Large', indicates that the server is refusing to process the request because the payload is larger than the server is willing or able to handle. The server may close the connection to prevent the client from continuing to send data. If the condition is temporary, the server should include a Retry-After header indicating when the client can try again.

Defined in RFC 9110

Common Causes

  • Uploading a file that exceeds the server's maximum upload size limit
  • Sending a JSON or form body that is too large for the server's configured maximum
  • Proxy or web server body size limits being smaller than the application expects
  • Batch API requests containing too many items in a single payload

How to Fix

  • Reduce the size of the request payload, compress data, or split it into multiple smaller requests
  • Check the server's maximum body size configuration (e.g., client_max_body_size in Nginx)
  • Use multipart uploads or chunked transfer for large files
  • Increase the server's request size limit if the current limit is too restrictive