NGINX – client intended to send too large body

Going through syslogs I’ve noticed few errors like the one below:

2015/03/03 17:32:27 [error] 11622#0: *2047 client intended to send too large 
body: 1049196 bytes, client:, server:, request: 
"POST /?/Upload/&s=/_lRQBXpfsulxyH8IKKNAkjcKy5NSC./ HTTP/1.1", host: 
"", referrer: ""

The error is presented because a request being sent to the server contains more data than Nginx allows by default. You can increase the allowed maximum with the client_max_body_size attribute.

You can add the client_max_body_size attribute to your configuration files in multiple places to control what sites or locations the attribute affects. For example, you can add it to your main config file to ensure than any site can upload the value you set.


http {
 client_max_body_size 100M;

You could also add it inside the server { tags of an individual site, or even the location { tags of a specific location.


service nginx reload

Leave a Reply

Your email address will not be published. Required fields are marked *

ten − 3 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.