This error occurs when a request is made from a client that is too large to be processed by the webserver. If your web server is setting a particular HTTP request size limit, clients may come across a 413 Request Entity too large response.
Dependency:
It is dependent upon the type of web server you are using that will determine which directives you need to configure. Whether you want to restrict users from uploading overly large files to your web server or want to increase the upload size limit.
Fixing this error:
Depending on the server you are using, implement the necessary changes to configure your web servers maximum HTTP request size allowance. By doing so, you can set the threshold file size for which the client is allowed to upload and if the limit is passed, then the above error occurs.
Nagix:
For nagix users, the directive that determines what the allowable HTTP request size can be is client_max_body_size. This directive already defines and if not you can add by an HTTP, server, or location block then define the value;
server {
client_max_body_size 100M;
...
}
Apache:
For the Apache web server, a similar directive is called LimitRequestBody. This provides the same functionality as client_max_body_size.
For Example:
If you wanted to restrict requests larger than 100MB then use the following;
LimitRequestBody 104857600