HTTP 413 status code means a server refuses to process the request because the request body (also known as request entity or payload) is too large.
The server may choose to close the connection to prevent the client from finishing the request. However, if the condition is temporary (e.g., data upload quota for an API service), the server should send the
Retry-After HTTP header prompting the client to retry after a certain period.
You can impose the limit on request body size by setting the
LimitRequestBody config in Apache. It defaults to
0, which means there are no restrictions on request body size.
It is worth mentioning that the limit is typically imposed by PHP. To increase the file upload and POST request size to 10 megabytes, for example, set
post_max_size configs in the
upload_max_filesize = 10M post_max_size = 10M
In Nginx, the request body size limit is governed by the
client_max_body_size config, which is set to
1M (1 megabyte) by default. To increase the limit to 10 megabytes, for example, set the following line in
You can disable the file size checking altogether by setting
0, although you open yourself up for a DoS attack.
No spyware, no promotional emails, or keyword-stuffed junk. I will only send you a single email when I've got something interesting to say. Unsubscribe anytime.
You can also subscribe to the Atom feed (it's like RSS, but better).