From 7cd0450dae6d7f3267736940c79d3a0d558e8ccd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Apr 2026 15:36:12 +0000 Subject: [PATCH 1/2] perf(nextcloud): tune OPcache, APCu, realpath_cache, output_buffering, and Redis session settings Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/623eef77-7b4e-428b-b06f-e0c7403f8cf6 Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com> --- Containers/nextcloud/Dockerfile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index c4c66730..dec33837 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -114,18 +114,18 @@ RUN set -ex; \ # set recommended PHP.ini settings # see https://docs.nextcloud.com/server/stable/admin_manual/installation/server_tuning.html#enable-php-opcache and below { \ - echo 'opcache.max_accelerated_files=10000'; \ + echo 'opcache.max_accelerated_files=20000'; \ echo 'opcache.memory_consumption=256'; \ echo 'opcache.interned_strings_buffer=64'; \ echo 'opcache.save_comments=1'; \ echo 'opcache.revalidate_freq=60'; \ echo 'opcache.jit=1255'; \ - echo 'opcache.jit_buffer_size=8M'; \ + echo 'opcache.jit_buffer_size=128M'; \ } > /usr/local/etc/php/conf.d/opcache-recommended.ini; \ \ { \ echo 'apc.enable_cli=1'; \ - echo 'apc.shm_size=64M'; \ + echo 'apc.shm_size=128M'; \ } >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \ \ { \ @@ -135,6 +135,9 @@ RUN set -ex; \ echo 'max_execution_time=${PHP_MAX_TIME}'; \ echo 'max_input_time=-1'; \ echo 'default_socket_timeout=${PHP_MAX_TIME}'; \ + echo 'output_buffering=0'; \ + echo 'realpath_cache_size=8M'; \ + echo 'realpath_cache_ttl=600'; \ } > /usr/local/etc/php/conf.d/nextcloud.ini; \ \ { \ @@ -142,7 +145,10 @@ RUN set -ex; \ echo 'session.save_path = "tcp://${REDIS_HOST}:${REDIS_PORT}?database=${REDIS_DB_INDEX}${REDIS_USER_AUTH}&auth[]=${REDIS_HOST_PASSWORD}"'; \ echo 'redis.session.locking_enabled = 1'; \ echo 'redis.session.lock_retries = -1'; \ - echo 'redis.session.lock_wait_time = 10000'; \ + echo '; 100ms in microseconds - prevents timeout on long requests such as large file uploads'; \ + echo 'redis.session.lock_wait_time = 100000'; \ + echo '; prevents stale locks from crashed workers (seconds)'; \ + echo 'redis.session.lock_expire = 60'; \ echo 'session.gc_maxlifetime = 86400'; \ } > /usr/local/etc/php/conf.d/redis-session.ini; \ \ From 310429c5fd4049971e4d02c39d41ccb024c77123 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 19 Apr 2026 22:03:09 +0000 Subject: [PATCH 2/2] fix: add shm_size=128M to nextcloud container to match apc.shm_size Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/0b44e4a1-dccc-4541-b4cb-07fceaa046ca Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com> --- php/containers.json | 1 + 1 file changed, 1 insertion(+) diff --git a/php/containers.json b/php/containers.json index 96346cfe..c56ffb05 100644 --- a/php/containers.json +++ b/php/containers.json @@ -267,6 +267,7 @@ ], "stop_grace_period": 600, "restart": "unless-stopped", + "shm_size": 134217728, "devices": [ "/dev/dri" ],