From 452567ed4357e9090ceb230e6dff02377a61d30e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 31 Jul 2026 08:44:38 +0000 Subject: [PATCH] fix(Apache): disable mod_reqtimeout body rate limit to allow slow uploads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #8457 — large file uploads on slow connections were being terminated by Apache's mod_reqtimeout MinRate=500 default for request bodies. This adds an explicit RequestReadTimeout directive that disables the body rate limit (body=0) while keeping the header timeout for slowloris protection. The existing Timeout directive (set to APACHE_MAX_TIME / NEXTCLOUD_MAX_TIME) remains as the effective I/O timeout. Also ensures mod_reqtimeout is explicitly loaded in the Dockerfile. Assisted-by: GitHub Copilot:claude-sonnet-4 --- Containers/apache/Dockerfile | 1 + Containers/apache/nextcloud.conf | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/Containers/apache/Dockerfile b/Containers/apache/Dockerfile index 755a161c..e0e32bef 100644 --- a/Containers/apache/Dockerfile +++ b/Containers/apache/Dockerfile @@ -48,6 +48,7 @@ RUN set -ex; \ -e 's/^#\(LoadModule .*mod_alias.so\)/\1/' \ -e 's/^#\(LoadModule .*mod_mpm_event.so\)/\1/' \ -e 's/^#\(LoadModule .*mod_brotli.so\)/\1/' \ + -e 's/^#\(LoadModule .*mod_reqtimeout.so\)/\1/' \ -e 's/\(LoadModule .*mod_mpm_worker.so\)/#\1/' \ -e 's/\(LoadModule .*mod_mpm_prefork.so\)/#\1/' \ -e 's/\(ScriptAlias \)/#\1/' \ diff --git a/Containers/apache/nextcloud.conf b/Containers/apache/nextcloud.conf index 968f8901..aa63d75b 100644 --- a/Containers/apache/nextcloud.conf +++ b/Containers/apache/nextcloud.conf @@ -49,6 +49,13 @@ Listen 8000 # See https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxytimeout ProxyTimeout ${APACHE_MAX_TIME} + # See https://httpd.apache.org/docs/current/mod/mod_reqtimeout.html + # Disable body rate limit so that large uploads on slow connections are not aborted. + # The Timeout directive above still applies as the overall I/O timeout. + + RequestReadTimeout header=20-40,MinRate=500 body=0 + + # See https://httpd.apache.org/docs/trunk/mod/core.html#traceenable TraceEnable Off