Skip to content

Php-fpm child process crash when installing / updating an app (on raspberry pi 5) #2576

Description

@mathieu-margier

Issue

I've noticed that each time I try to install and/or update an app from the web interface, I get the "502: Bad gateway" error for any subsequent requests. When looking at the nextcloud's container logs, it stays the child processes are constantly crashing:

May 12 11:22:00 nextcloud_app[1087224]: [12-May-2026 09:22:00] WARNING: [pool www] child 181 exited on signal 11 (SIGSEGV - core dumped) after 56.485757 seconds from start
May 12 11:22:00 nextcloud_app[1087224]: [12-May-2026 09:22:00] NOTICE: [pool www] child 205 started
May 12 11:22:01 nextcloud_app[1087224]: [12-May-2026 09:22:01] WARNING: [pool www] child 178 exited on signal 11 (SIGSEGV - core dumped) after 214.245756 seconds from start
May 12 11:22:01 nextcloud_app[1087224]: [12-May-2026 09:22:01] NOTICE: [pool www] child 206 started
May 12 11:22:02 nextcloud_app[1087224]: [12-May-2026 09:22:02] WARNING: [pool www] child 204 exited on signal 11 (SIGSEGV - core dumped) after 19.482163 seconds from start
May 12 11:22:02 nextcloud_app[1087224]: [12-May-2026 09:22:02] NOTICE: [pool www] child 207 started
May 12 11:22:02 nextcloud_app[1087224]: [12-May-2026 09:22:02] WARNING: [pool www] child 205 exited on signal 11 (SIGSEGV - core dumped) after 2.076329 seconds from start
May 12 11:22:02 nextcloud_app[1087224]: [12-May-2026 09:22:02] NOTICE: [pool www] child 208 started
May 12 11:22:03 nextcloud_app[1087224]: [12-May-2026 09:22:03] WARNING: [pool www] child 206 exited on signal 11 (SIGSEGV - core dumped) after 2.357498 seconds from start
May 12 11:22:03 nextcloud_app[1087224]: [12-May-2026 09:22:03] NOTICE: [pool www] child 209 started
May 12 11:22:32 nextcloud_app[1087224]: [12-May-2026 09:22:32] WARNING: [pool www] child 209 exited on signal 11 (SIGSEGV - core dumped) after 29.095544 seconds from start
May 12 11:22:32 nextcloud_app[1087224]: [12-May-2026 09:22:32] NOTICE: [pool www] child 210 started

If I restart the nextcloud (php) container, the child process no longer crashes, and the bad gateway error is gone. The app is also correctly installed/updated.

Workaround

When looking for similar issues, I found this Github issue.
They say that OPCache's JIT is not recommended for other architectures than x64, and might be causing the issue.

So, to disable OPCache's JIT, I added the following file, and mounted it as a read-only volume at /usr/local/etc/php/conf.d/tweaks-disable-opcache-jit.ini:

opcache.jit=0
opcache.jit_buffer_size=0

It indeed solved my issue.

Maybe the opcache's JIT should be disabled for non-x64 architecture to avoid troubles ?

Setup

Nextcloud server is running on podman, with raspberry pi 5 (aarch64 / arm64) as host system.
Containers are managed using podman quadlet (systemd services), with the nextcloud:33-fpm image, and postgresql database.

Details

Result of occ config:list system :

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "serverid": "0",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": ["***REDACTED**"],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "33.0.3.2",
        "overwrite.cli.url": "***REDACTED**",
        "htaccess.RewriteBase": "\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "maintenance": false,
        "default_phone_region": "FR",
        "theme": "",
        "loglevel": 2,
        "log_rotate_size": 10485760,
        "app_install_overwrite": [
            "integration_whiteboard",
            "files_markdown",
            "news"
        ],
        "maintenance_window_start": 1,
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "upgrade.disable-web": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "mail_smtpauth": true,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpstreamoptions": {
            "ssl": {
                "verify_peer": false,
                "verify_peer_name": false
            }
        },
        "data-fingerprint": "1a0aa84bb341d90c17e4bea6ac46e19e"
    }
}

Quadlet files (equivalent to a docker compose) :

nextcloud.pod

[Unit]
Description=Pod nextcloud
After=collabora_code.container

[Pod]
PodName=nextcloud
PublishPort=8001:80

[Service]
Restart=always

[Install]
# Start by default on boot
WantedBy=multi-user.target default.target

nextcloud_db.container

[Unit]
Description=Nextcloud DB (postgres)

[Container]
ContainerName=nextcloud_db
Pod=nextcloud.pod
Image=docker.io/library/postgres:17
AutoUpdate=registry
Volume=/opt/db/nextcloud/postgres:/var/lib/postgresql/data
EnvironmentFile=/home/nextcloud/container/.env

[Service]
Restart=always

nextcloud_redis.container

[Unit]
Description=Nextcloud cache (redis)

[Container]
ContainerName=nextcloud_redis
Pod=nextcloud.pod
Image=docker.io/library/redis
AutoUpdate=registry

[Service]
Restart=always

nextcloud_app.container

[Unit]
Description=Main nextcloud container
Requires=nextcloud_db.container
After=nextcloud_db.container
Requires=nextcloud_redis.container
After=nextcloud_redis.container

[Container]
ContainerName=nextcloud_app
Pod=nextcloud.pod
Image=docker.io/library/nextcloud:33-fpm
AutoUpdate=registry
Volume=/opt/data/nextcloud/data:/var/www/html
EnvironmentFile=/home/nextcloud/container/.env
Environment=POSTGRES_HOST=localhost
Environment=REDIS_HOST=localhost

[Service]
Restart=always

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions