From 8462b10e3b50bccbbf0fca63105c9692be476385 Mon Sep 17 00:00:00 2001 From: BeauTroll <-> Date: Sat, 3 Jan 2026 04:00:12 +0100 Subject: [PATCH] fix: increase Apache MaxRequestWorkers and optimize performance settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Increase MaxRequestWorkers from 150 to 400 to prevent "server reached MaxRequestWorkers" errors - Configure MPM Prefork module with optimized worker settings - Add AllowEncodedSlashes NoDecode for special characters in filenames - Increase Redis maxmemory from 512MB to 2GB for better caching - Extend PHP execution times from 1800s to 7200s for large operations - Increase MariaDB max_allowed_packet to 1GB for large file uploads These changes resolve sync failures caused by Apache worker exhaustion. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- apache/nextcloud.conf | 13 +++++++++++++ db-config/my.cnf | 3 +++ docker-compose.yml | 6 +++--- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/apache/nextcloud.conf b/apache/nextcloud.conf index 36254bc..5ae7470 100644 --- a/apache/nextcloud.conf +++ b/apache/nextcloud.conf @@ -1,6 +1,10 @@ # Configuration pour reverse proxy Traefik # Récupération de l'IP réelle du client via X-Forwarded-For ServerName cloud.agence66.fr + +# Autoriser les caractères spéciaux encodés dans les noms de fichiers +AllowEncodedSlashes NoDecode + RemoteIPHeader X-Forwarded-For RemoteIPTrustedProxy 172.16.0.0/12 RemoteIPTrustedProxy 10.0.0.0/8 @@ -15,6 +19,15 @@ KeepAlive On KeepAliveTimeout 300 MaxKeepAliveRequests 200 +# Configuration MPM Prefork - Augmentation des workers + + StartServers 10 + MinSpareServers 10 + MaxSpareServers 20 + MaxRequestWorkers 400 + MaxConnectionsPerChild 1000 + + Options FollowSymLinks MultiViews AllowOverride All diff --git a/db-config/my.cnf b/db-config/my.cnf index 6c510a5..687ed29 100644 --- a/db-config/my.cnf +++ b/db-config/my.cnf @@ -13,3 +13,6 @@ binlog_format = ROW # Connections max_connections = 200 + +# Gros fichiers - augmenter la taille max des paquets +max_allowed_packet = 1G diff --git a/docker-compose.yml b/docker-compose.yml index 199f2d4..62864f5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,8 +34,8 @@ services: - PHP_MEMORY_LIMIT=4096M - PHP_UPLOAD_MAX_FILESIZE=10G - PHP_POST_MAX_SIZE=10G - - PHP_MAX_EXECUTION_TIME=1800 - - PHP_MAX_INPUT_TIME=1800 + - PHP_MAX_EXECUTION_TIME=7200 + - PHP_MAX_INPUT_TIME=7200 # - PHP_UPLOAD_MAX_FILESIZE=1024G # - PHP_POST_MAX_SIZE=1024G # - PHP_MAX_EXECUTION_TIME=86400 @@ -74,7 +74,7 @@ services: redis: image: redis:alpine restart: unless-stopped - command: redis-server --requirepass ${REDIS_HOST_PASSWORD} --maxmemory 512mb --maxmemory-policy allkeys-lru + command: redis-server --requirepass ${REDIS_HOST_PASSWORD} --maxmemory 2gb --maxmemory-policy allkeys-lru networks: - nextcloud-net