From 0f41399c9fae6ec75149142abb655fc81512820a Mon Sep 17 00:00:00 2001 From: quietsy Date: Thu, 9 Jan 2025 12:49:39 +0200 Subject: [PATCH] Fix uploading large files --- Dockerfile | 10 +++++----- Dockerfile.aarch64 | 10 +++++----- README.md | 1 + readme-vars.yml | 1 + root/defaults/nginx/site-confs/default.conf.sample | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 80909ab..87caf48 100644 --- a/Dockerfile +++ b/Dockerfile @@ -72,11 +72,11 @@ RUN \ echo 'opcache.jit_buffer_size=128M'; \ } >> "/etc/php83/conf.d/00_opcache.ini" && \ { \ - echo 'memory_limit=512M'; \ - echo 'upload_max_filesize=512M'; \ - echo 'post_max_size=512M'; \ - echo 'max_input_time=300'; \ - echo 'max_execution_time=300'; \ + echo 'memory_limit=-1'; \ + echo 'upload_max_filesize=100G'; \ + echo 'post_max_size=100G'; \ + echo 'max_input_time=3600'; \ + echo 'max_execution_time=3600'; \ echo 'output_buffering=0'; \ echo 'always_populate_raw_post_data=-1'; \ } >> "/etc/php83/conf.d/nextcloud.ini" && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index fece989..c718fbe 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -72,11 +72,11 @@ RUN \ echo 'opcache.jit_buffer_size=128M'; \ } >> "/etc/php83/conf.d/00_opcache.ini" && \ { \ - echo 'memory_limit=512M'; \ - echo 'upload_max_filesize=512M'; \ - echo 'post_max_size=512M'; \ - echo 'max_input_time=300'; \ - echo 'max_execution_time=300'; \ + echo 'memory_limit=-1'; \ + echo 'upload_max_filesize=100G'; \ + echo 'post_max_size=100G'; \ + echo 'max_input_time=3600'; \ + echo 'max_execution_time=3600'; \ echo 'output_buffering=0'; \ echo 'always_populate_raw_post_data=-1'; \ } >> "/etc/php83/conf.d/nextcloud.ini" && \ diff --git a/README.md b/README.md index a9e6395..6e06784 100644 --- a/README.md +++ b/README.md @@ -350,6 +350,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **09.01.25:** - Fix uploading large files. Existing users should update their nginx confs. * **09.07.24:** - Add `previous` tag for n-1 releases. * **24.06.24:** - Rebase to Alpine 3.20. Existing users should update their nginx confs to avoid http2 deprecation warnings. * **19.05.24:** - Added util-linux package required for taskset. diff --git a/readme-vars.yml b/readme-vars.yml index 03c7281..cdb0e98 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -145,6 +145,7 @@ init_diagram: | "nextcloud:previous" <- Base Images # changelog changelogs: + - {date: "09.01.25:", desc: "Fix uploading large files. Existing users should update their nginx confs."} - {date: "09.07.24:", desc: "Add `previous` tag for n-1 releases."} - {date: "24.06.24:", desc: "Rebase to Alpine 3.20. Existing users should update their nginx confs to avoid http2 deprecation warnings."} - {date: "19.05.24:", desc: "Added util-linux package required for taskset."} diff --git a/root/defaults/nginx/site-confs/default.conf.sample b/root/defaults/nginx/site-confs/default.conf.sample index d11eff1..ea0f2bf 100644 --- a/root/defaults/nginx/site-confs/default.conf.sample +++ b/root/defaults/nginx/site-confs/default.conf.sample @@ -25,7 +25,7 @@ server { # https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html#nextcloud-in-the-webroot-of-nginx # set max upload size and increase upload timeout: - client_max_body_size 512M; + client_max_body_size 0; client_body_timeout 300s; fastcgi_buffers 64 4K;