From be65e01c50c7f02a2b65d9462f949ab4181afa0a Mon Sep 17 00:00:00 2001 From: mauro2306 <69889380+mauro2306@users.noreply.github.com> Date: Tue, 1 Sep 2026 21:38:03 +0200 Subject: [PATCH 1/2] Disable OPcache JIT by default The tracing JIT this image enables (opcache.jit=1255, 128M buffer) can emit machine code that loops forever, wedging every php-fpm worker at 100% CPU until the container is restarted. See linuxserver/docker-nextcloud#539. PHP ships with the JIT off by default; Nextcloud's own tuning docs recommend tracing with an 8M buffer. 1255 is not a documented preset (tracing is 1254). --- Dockerfile | 4 ++-- Dockerfile.aarch64 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 61a1becf..5ee54526 100644 --- a/Dockerfile +++ b/Dockerfile @@ -67,8 +67,8 @@ RUN \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.save_comments=1'; \ echo 'opcache.revalidate_freq=60'; \ - echo 'opcache.jit=1255'; \ - echo 'opcache.jit_buffer_size=128M'; \ + echo 'opcache.jit=disable'; \ + echo 'opcache.jit_buffer_size=0'; \ } >> "/etc/php84/conf.d/00_opcache.ini" && \ { \ echo 'memory_limit=-1'; \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 86acbad4..9bafc993 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -67,8 +67,8 @@ RUN \ echo 'opcache.memory_consumption=128'; \ echo 'opcache.save_comments=1'; \ echo 'opcache.revalidate_freq=60'; \ - echo 'opcache.jit=1255'; \ - echo 'opcache.jit_buffer_size=128M'; \ + echo 'opcache.jit=disable'; \ + echo 'opcache.jit_buffer_size=0'; \ } >> "/etc/php84/conf.d/00_opcache.ini" && \ { \ echo 'memory_limit=-1'; \ From 4686a95dd5c0f090e1cf7db2b76bbfa182ed9b33 Mon Sep 17 00:00:00 2001 From: mauro2306 <69889380+mauro2306@users.noreply.github.com> Date: Sat, 5 Sep 2026 10:18:58 +0200 Subject: [PATCH 2/2] Add changelog entry for OPcache JIT disable Added changelog entry for disabling OPcache JIT due to performance issues. --- readme-vars.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/readme-vars.yml b/readme-vars.yml index 8139ab34..bd931482 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -145,6 +145,7 @@ init_diagram: | "nextcloud:latest" <- Base Images # changelog changelogs: + - {date: "05.09.26:", desc: "Disable OPcache JIT. The tracing JIT could emit code that loops forever, pinning all php-fpm workers at 100% CPU until the container was restarted."} - {date: "10.07.25:", desc: "Rebase to Alpine 3.22."} - {date: "12.02.25:", desc: "Rebase to Alpine 3.21."} - {date: "09.01.25:", desc: "Fix uploading large files. Existing users should update their nginx confs."}