Welcome! Log In Create A New Profile

Advanced

Re: Why is client_max_body_size default set to 1m?

Maxim Dounin
October 12, 2010 12:54PM
Hello!

On Tue, Oct 12, 2010 at 12:22:12PM -0400, jlangevin wrote:

> After migrating one of our servers to Nginx from Apache, I decided to
> test file uploads (as I've implemented the Accelerated Upload Support
> feature in PHP-FPM/nginx). I found that
> [url=http://wiki.nginx.org/NginxHttpCoreModule#client_max_body_size]client_max_body_size[/url]
> is an additional directive that affects POST/upload file sizes.
>
> So this means that in addition to the 2 directives in PHP that must be
> configured for upload file size, I must also now configure Nginx as
> well?
>
> I can understand this directive existing, but why default it to 1mb?

It is believed to be reasonably high for non-upload use cases, and
reasonably low to prevent DoS by uploading large files (with
default 1 worker processes and 512 worker connections it's possible to
consume up to 512M in client_body_temp directory).

For upload use cases one is probably going to tune it for his own
limits anyway - taking into account available disk space and so on.

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Why is client_max_body_size default set to 1m?

jlangevin October 12, 2010 12:17PM

Re: Why is client_max_body_size default set to 1m?

Maxim Dounin October 12, 2010 12:54PM

Re: Why is client_max_body_size default set to 1m?

jlangevin October 12, 2010 01:05PM

Re: Why is client_max_body_size default set to 1m?

Maxim Dounin October 12, 2010 01:44PM

Re: Why is client_max_body_size default set to 1m?

jlangevin October 12, 2010 02:24PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 269
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready