Skip to content
MtrXTools

client intended to send too large body

An upload exceeded client_max_body_size

Seen in nginx error log (shown to visitors as 413 Request Entity Too Large)

A request body was larger than nginx allows, so nginx rejected it before it reached the application.

Common causes

  • client_max_body_size is at its default of 1 MB, which is too small for file uploads.
  • The limit was set in one server or location block but not the one handling the request.

How to fix it

  1. Raise the limit where needed: client_max_body_size 50m; in the http, server or location block, then nginx -t and reload.
  2. Make the application limit match (PHP upload_max_filesize and post_max_size, for example).

Got a different message? Paste it into the error explainer.

Related errors

All 19 Web servers & certificates errors