Nextcloud performance is terribly slow with nc-32 with all config

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • nc 32
  • Operating system and version (e.g., Ubuntu 24.04):
    • debian 12
  • Web server and version (e.g, Apache 2.4.25):
    • n/a
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • nginx 1.27.2
  • PHP version (e.g, 8.3):
    • 8.3
  • Is this the first time you’ve seen this error? (Yes / No):
    • n/a
  • When did this problem seem to first start?
    • from day one
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • aio + nc fpm
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Summary of the issue you are facing:

I’ve made all the modifications necessary to improve the performance.

My system is an 12GB, core i5/i3 system (3 of them running in a swarm cluster). I’ve modified the php fpm config

/var/www/html $ cat /usr/local/etc/php-fpm.d/zz-custom.conf 
[www]
pm.max_children = 20
pm.start_servers = 6
pm.min_spare_servers = 5
pm.max_spare_servers = 10

The php memory is 4GB, with opcache of 1024, although when i do

/var/www/html $ php -r "var_dump(extension_loaded('opcache'));"
bool(false)

I am using nextcloud:32.0.0-fpm-alpine image with the following config

      - PHP_OPCACHE_MEMORY_CONSUMPTION=1024
      - PHP_MEMORY_LIMIT=4G

Steps to replicate it (hint: details matter!):

  1. Just using the site, every page takes 2-3 seconds sometimes 4 to load

Log entries

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

timestamp=2025-10-19T19:35:52+00:00 remote_addr=10.0.0.7 host=nextcloud.domain.org method=GET uri=/apps/theming/manifest/spreed?v=96a80b15 protocol=HTTP/2.0 status=200 body_bytes_sent=292 request_time=1.614 upstream_response_time=1.601 upstream_addr=10.0.2.6:9000 referer=https://nextcloud.domain.org/apps/spreed/ user_agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36

timestamp=2025-10-19T19:35:54+00:00 remote_addr=10.0.0.7 host=nextcloud.domain.org method=GET uri=/index.php/apps/files/preview-service-worker.js protocol=HTTP/2.0 status=200 body_bytes_sent=5323 request_time=1.817 upstream_response_time=1.817 upstream_addr=10.0.2.6:9000 referer=https://nextcloud.domain.org/index.php/apps/files/preview-service-worker.js user_agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36

timestamp=2025-10-19T19:35:56+00:00 remote_addr=10.0.0.7 host=nextcloud.domain.org method=GET uri=/apps/theming/icon/spreed?v=0 protocol=HTTP/2.0 status=200 body_bytes_sent=15161 request_time=3.913 upstream_response_time=3.913 upstream_addr=10.0.2.6:9000 referer=https://nextcloud.domain.org/apps/spreed/ user_agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36

timestamp=2025-10-19T19:36:11+00:00 remote_addr=10.0.0.7 host=nextcloud.domain.org method=GET uri=/ocs/v2.php/apps/spreed/api/v4/room?modifiedSince=0&includeStatus=true&includeLastMessage=true protocol=HTTP/2.0 status=200 body_bytes_sent=1864 request_time=3.612 upstream_response_time=3.605 upstream_addr=10.0.2.6:9000 referer=https://nextcloud.domain.org/apps/spreed/ user_agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

{
    "system": {
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwritehost": "nextcloud.domain.org",
        "overwriteprotocol": "https",
        "upgrade.disable-web": true,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "nextcloud.domain.org"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "32.0.0.13",
        "overwrite.cli.url": "https:\/\/nextcloud.domain.org",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbpersistent": true,
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "mysql.utf8mb4": true,
        "filelocking.enabled": true,
        "maintenance_window_start": 1,
        "default_language": "en",
        "default_locale": "en_US",
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\PDF"
        ],
        "filesystem_check_changes": 0,
        "part_file_in_storage": false,
        "log_type": "file",
        "logfile": "\/var\/www\/html\/data\/nextcloud.log",
        "loglevel": 2,
        "allow_local_remote_servers": true,
        "forwarded_for_headers": [
            "X_FORWARDED_FOR"
        ]
    }
}

Apps

Enabled:
  - activity: 5.0.0-dev.0
  - app_api: 32.0.0
  - bruteforcesettings: 5.0.0-dev.0
  - circles: 32.0.0
  - cloud_federation_api: 1.16.0
  - comments: 1.22.0
  - contactsinteraction: 1.13.1
  - dashboard: 7.12.0
  - dav: 1.34.2
  - federatedfilesharing: 1.22.0
  - federation: 1.22.0
  - files: 2.4.0
  - files_downloadlimit: 5.0.0-dev.0
  - files_pdfviewer: 5.0.0-dev.0
  - files_reminders: 1.5.0
  - files_sharing: 1.24.0
  - files_trashbin: 1.22.0
  - files_versions: 1.25.0
  - firstrunwizard: 5.0.0-dev.0
  - logreader: 5.0.0-dev.0
  - lookup_server_connector: 1.20.0
  - nextcloud_announcements: 4.0.0-dev.0
  - notifications: 5.0.0-dev.0
  - notify_push: 1.2.0
  - oauth2: 1.20.0
  - password_policy: 4.0.0-dev.0
  - photos: 5.0.0-dev.1
  - previewgenerator: 5.10.0
  - privacy: 4.0.0-dev.0
  - profile: 1.1.0
  - provisioning_api: 1.22.0
  - recommendations: 5.0.0-dev.0
  - related_resources: 3.0.0-dev.0
  - richdocuments: 9.0.1
  - serverinfo: 4.0.0-dev.0
  - settings: 1.15.1
  - sharebymail: 1.22.0
  - spreed: 22.0.0
  - support: 4.0.0-dev.0
  - survey_client: 4.0.0-dev.0
  - systemtags: 1.22.0
  - text: 6.0.0-dev.0
  - theming: 2.7.0
  - twofactor_backupcodes: 1.21.0
  - updatenotification: 1.22.0
  - user_oidc: 8.1.0
  - user_status: 1.12.0
  - viewer: 5.0.0-dev.0
  - weather_status: 1.12.0
  - webhook_listeners: 1.3.0
  - workflowengine: 2.14.0
Disabled:
  - admin_audit: 1.22.0
  - encryption: 2.20.0
  - files_external: 1.24.0
  - suspicious_login: 10.0.0-dev.0
  - twofactor_nextcloud_notification: 6.0.0-dev.0
  - twofactor_totp: 14.0.0
  - user_ldap: 1.23.0

Are you saying this started to occur when you upgraded from v31->v32 for you? Or is this a new installation so no comparison possible?

For the record, you’re not using Nextcloud AIO. You’re using the community micro-services Docker image.

Check the output of php -m and/or use the correct name:

php -r "var_dump(extension_loaded('zend opcache'));"

Just using the site, every page takes 2-3 seconds sometimes 4 to load

Are you using the standard Nginx configuration from the Docker repo or …?

Anyhow, please:

  • post your entire Compose file
  • check your Nextcloud log (data/nextcloud.log)
  • check your php-fpm container logs to see the php-fpm logs

Additional ideas:

  • test w/o swarm and, possibly, without whatever shared filesystem you’re using to start eliminating some variables
2 Likes

I’ll post these in a second. The glusterfs file system point is an interesting one. I have other systems running on glusterfs as well like seafile, owncloud infinite scale. Essentially my entire stack. They never have any issues.

Any particular reason why nextcloud would be struggling?

Turns out it was my glusterfs backend, moved to zfs, everything is buttery smooth.

1 Like

is vfs disabled for nextcloud-client-4.0.1? on linux? I tried enabling it, it still disables itself.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.