ScaleScaleScaleScale

Tips / Nginx


Nginx Error 413 Request Entity Too Large

Days ago, using Nginx as a Reverse proxy I found this weird error while trying to upload more than 2MB of data:

Nginx Error 413 Request Entity Too Large

After investigating I found the client_max_body_size directive determines the maximum accepted body size of client request. If size is greater than the given one, that’s when we get the error “Request Entity Too Large” (413), this is the way I fixed this:

Edit nginx.conf:

pico -w /etc/nginx/nginx.conf

Edit or add this variable:

client_max_body_size 3M;

Restart Nginx web server to apply the changes:

/etc/init.d/nginx restart

 

Popular search terms:

  • 413 error reverse proxy
  • a client request body is buffered to a temporary file kubernetes ingress 413
  • file upload 413 with nginx openrestify kubernetes
  • ingress-nginx 413
profile

Esteban Borges

Linux Geek, Webperf Addict, Nginx Fan. CTO @Infranetworking