From 25a27285028776c70d03644832dca3232afdd64e Mon Sep 17 00:00:00 2001 From: Josh Richards Date: Sun, 19 Nov 2023 19:13:23 -0500 Subject: [PATCH 1/2] Update Apache LimitRequestBody for >1 GiB chunking too The recent addition clarified Apache's new behavior and and this setting's impact on non-chunking clients. With the recent v2 chunking client implementations, the maxChunkSize can be as high as 5 GiB by default (e.g. see nextcloud/desktop#6222). This expands the language to note impact for chunking clients too and clarifies the available options. Signed-off-by: Josh Richards --- .../configuration_files/big_file_upload_configuration.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin_manual/configuration_files/big_file_upload_configuration.rst b/admin_manual/configuration_files/big_file_upload_configuration.rst index 8e188dc961a..a1bddf3f7d4 100644 --- a/admin_manual/configuration_files/big_file_upload_configuration.rst +++ b/admin_manual/configuration_files/big_file_upload_configuration.rst @@ -65,7 +65,7 @@ for how to configure those values correctly: Apache ^^^^^^ -* `LimitRequestBody `_ (In Apache HTTP Server <=2.4.53 this defaulted to unlimited, but now defaults to 1 GiB. The new default limits uploads from non-chunking clients to 1 GiB. If this is a concern in your environment, override the new default by either manually setting it to ``0`` or to a value similar to that used for your local environment's PHP ``upload_max_filesize / post_max_size / memory_limit`` parameters.) +* `LimitRequestBody `_ (In Apache HTTP Server <=2.4.53 this defaulted to unlimited, but now defaults to 1 GiB. The new default limits uploads from non-chunking clients to 1 GiB. It also impacts chunked uploads if a maximum chunk size >1 GiB is permitted by the client configuration. If this is a concern in your environment, override the new default by either manually setting it to ``0`` or to a value similar to that used for your local environment's PHP ``upload_max_filesize / post_max_size / memory_limit`` parameters. For chunking clients, as an alternative, the default maximum chunk size can be reduced to 1 GiB. The trade-off is the maximum upload file size (assuming no other limitations elsewhere) will be cut to 10000 TiB rather than 50000 TiB - i.e 10,000 * maxChunkSize.) * `SSLRenegBufferSize `_ * `Timeout `_ From 9ebff35ca04591510c71eb276945e76de2bbfb56 Mon Sep 17 00:00:00 2001 From: Josh Richards Date: Mon, 20 Nov 2023 11:30:06 -0500 Subject: [PATCH 2/2] Assert rec'd value since v2 default is up to 5 GiB per chunk Signed-off-by: Josh Richards --- .../configuration_files/big_file_upload_configuration.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin_manual/configuration_files/big_file_upload_configuration.rst b/admin_manual/configuration_files/big_file_upload_configuration.rst index a1bddf3f7d4..bffc3ebd73d 100644 --- a/admin_manual/configuration_files/big_file_upload_configuration.rst +++ b/admin_manual/configuration_files/big_file_upload_configuration.rst @@ -65,7 +65,7 @@ for how to configure those values correctly: Apache ^^^^^^ -* `LimitRequestBody `_ (In Apache HTTP Server <=2.4.53 this defaulted to unlimited, but now defaults to 1 GiB. The new default limits uploads from non-chunking clients to 1 GiB. It also impacts chunked uploads if a maximum chunk size >1 GiB is permitted by the client configuration. If this is a concern in your environment, override the new default by either manually setting it to ``0`` or to a value similar to that used for your local environment's PHP ``upload_max_filesize / post_max_size / memory_limit`` parameters. For chunking clients, as an alternative, the default maximum chunk size can be reduced to 1 GiB. The trade-off is the maximum upload file size (assuming no other limitations elsewhere) will be cut to 10000 TiB rather than 50000 TiB - i.e 10,000 * maxChunkSize.) +* `LimitRequestBody `_ (In Apache HTTP Server <=2.4.53 this defaulted to unlimited, but now defaults to 1 GiB. The new default limits uploads from non-chunking clients to 1 GiB and also limits the maximum chunk size for recent versions of the official Nextcloud clients to 1 GiB even though they may require up to 5 GiB. This will break uploads >1 GiB under various circumstances. Our recommendation is to set this Apache parameter to 5 GiB or to the old default behavior of unlimited. Also make sure to review your local environment's PHP ``upload_max_filesize / post_max_size / memory_limit`` parameters to make sure they are at least the same size. For chunking capable clients that support manual configuration, as an alternative, the default maximum chunk size can be reduced to 1 GiB, but each client installation will need this parameter to then be manually configured.) * `SSLRenegBufferSize `_ * `Timeout `_