413 Request Entity Too Large in nginx - Rocketeers app

  [ Rocketeers ](/)   

[Login](https://rocketeersapp.com/login) 

 On this page

 Knowledge
---------

413 Request Entity Too Large in nginx
=====================================

### [\#Errors](https://rocketeersapp.com/knowledge/errors)

When uploading files you can encounter this error, which is caused by a limit in the nginx configuration.

 Published by [Mark van Eijk](https://rocketeersapp.com/author/mark-van-eijk) on January 22, 2024 
Updated on September 18, 2024 · 1 minute read

1. [About error 413](#content-about-error-413)
2. [Why do I see this error](#content-why-do-i-see-this-error)
3. [Solution](#content-solution)

[\#](#content-about-error-413 "Permalink")About error 413
---------------------------------------------------------

The error with response code 413 shows up as "Request Entity Too Large" in the error logs of nginx and "Payload Too Large" in the developer console of your browser. Other ways of telling you about this same error could be "Content Too Large" or "Requested content-length of ... is larger than the configured limit of ...".

[\#](#content-why-do-i-see-this-error "Permalink")Why do I see this error
-------------------------------------------------------------------------

This error happens when the uploaded file is larger than the configured maximum body size in nginx. Therefore the solution is to increase this limit.

[\#](#content-solution "Permalink")Solution
-------------------------------------------

By increasing the `client_max_body_size` in nginx, we can make sure the uploaded files are accepted. This can be done in the `nginx.conf` file, or in the `sites-available` configuration file of your website:

 ```
client_max_body_size 100M;

```

You can set the limit using these units:

 ```
ms	# milliseconds
s	# seconds
m	# minutes
h	# hours
d	# days
w	# weeks
M	# months, 30 days
y   # years, 365 days

```

### Subscribe to our newsletter

Do you want to receive regular updates with fresh and exclusive content to learn more about web development, hosting, security and performance? Subscribe now!

  Fill in your email address to receive updates  Subscribe 

#### More in [\#Errors](https://rocketeersapp.com/knowledge/errors)

- [Error in the HTTP2 framing layer](https://rocketeersapp.com/knowledge/error-in-the-http2-framing-layer)
- [403 Forbidden in nginx](https://rocketeersapp.com/knowledge/403-forbidden-nginx)
- [ERR\_TOO\_MANY\_REDIRECTS (redirect loop)](https://rocketeersapp.com/knowledge/err-too-many-redirects)
- [CORS error: No Access-Control-Allow-Origin header](https://rocketeersapp.com/knowledge/cors-error-no-access-control-allow-origin)
- [curl (60) SSL certificate problem: unable to get local issuer certificate](https://rocketeersapp.com/knowledge/curl-60-ssl-certificate-problem-unable-to-get-local-issuer-certificate)
- [NET::ERR\_CERT\_AUTHORITY\_INVALID](https://rocketeersapp.com/knowledge/net-err-cert-authority-invalid)

 [View all 11 articles →](https://rocketeersapp.com/knowledge/errors)
