Slow write on remonte.php and a lot of sleep in mariadb

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 30.0.5.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • debian 12
  • Web server and version (e.g, Apache 2.4.25):
    • 2.4.62-1`
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • non
  • PHP version (e.g, 8.3):
    • 8.3
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • one week
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • vm
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • `no

Summary of the issue you are facing:

Very slow use on Nextcloud Web.

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

  1. use Nextcloud
  2. very slow

Log entries

Slow logs on php

[27-Jan-2025 14:59:38]  [pool nextcloud] pid 71516
script_filename = /var/www/cloud.domaine.com/www/remote.php
[0x00007f2e1e015e30] password_verify() /var/www/cloud.domaine.com/www/lib/private/Security/Hasher.php:137
[0x00007f2e1e015da0] verifyHash() /var/www/cloud.domaine.com/www/lib/private/Security/Hasher.php:161
[0x00007f2e1e015cf0] verify() /var/www/cloud.domaine.com/www/lib/private/User/Database.php:357
[0x00007f2e1e015c30] checkPassword() /var/www/cloud.domaine.com/www/lib/private/User/Manager.php:248
[0x00007f2e1e015b60] checkPasswordNoLogging() /var/www/cloud.domaine.com/www/lib/private/User/Session.php:578
[0x00007f2e1e015ad0] loginWithPassword() /var/www/cloud.domaine.com/www/lib/private/User/Session.php:307
[0x00007f2e1e015a50] login() /var/www/cloud.domaine.com/www/lib/private/User/Session.php:404
[0x00007f2e1e015920] logClientIn() /var/www/cloud.domaine.com/www/apps/dav/lib/Connector/Sabre/Auth.php:87
[0x00007f2e1e015890] validateUserPass() /var/www/cloud.domaine.com/www/3rdparty/sabre/dav/lib/DAV/Auth/Backend/AbstractBasic.php:103
[0x00007f2e1e0157c0] check() /var/www/cloud.domaine.com/www/apps/dav/lib/Connector/Sabre/Auth.php:198
[0x00007f2e1e0156e0] auth() /var/www/cloud.domaine.com/www/apps/dav/lib/Connector/Sabre/Auth.php:112
[0x00007f2e1e015600] check() /var/www/cloud.domaine.com/www/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php:179
[0x00007f2e1e015530] check() /var/www/cloud.domaine.com/www/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php:135
[0x00007f2e1e015470] beforeMethod() /var/www/cloud.domaine.com/www/3rdparty/sabre/event/lib/WildcardEmitterTrait.php:89
[0x00007f2e1e015390] emit() /var/www/cloud.domaine.com/www/3rdparty/sabre/dav/lib/DAV/Server.php:456
[0x00007f2e1e0152d0] invokeMethod() /var/www/cloud.domaine.com/www/apps/dav/lib/Connector/Sabre/Server.php:43
[0x00007f2e1e015250] start() /var/www/cloud.domaine.com/www/apps/dav/lib/Server.php:371
[0x00007f2e1e0151d0] exec() /var/www/cloud.domaine.com/www/apps/dav/appinfo/v2/remote.php:19
[0x00007f2e1e015140] [INCLUDE_OR_EVAL]() /var/www/cloud.domaine.com/www/remote.php:146

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

{"reqId":"yAcFHEwTLDSo9EuGjaFD","level":4,"time":"2025-01-27T15:01:27+01:00","remoteAddr":"141.255.131.117","user":"miel_salaries","app":"no app in context","method":"PROPFIND","url":"/remote.php/dav/files/***********","message":"Could not boot files_trackdownloads: Call to undefined method OC\\Server::getEventDispatcher()","userAgent":"Mozilla/5.0 (Linux) mirall/3.15.3-20250107.145041.a595d5bcb-1.0~jammy1 (Nextcloud, linuxmint-5.15.0-130-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"30.0.5.1","exception":{"Exception":"Error","Message":"Call to undefined method OC\\Server::getEventDispatcher()","Code":0,"Trace":[{"file":"/var/www/cloud.domaine.com/www/lib/private/AppFramework/Bootstrap/Coordinator.php","line":157,"function":"boot","class":"OCA\\FilesTrackDownloads\\AppInfo\\Application","type":"->"},{"file":"/var/www/cloud.domaine.com/www/lib/private/App/AppManager.php","line":434,"function":"bootApp","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/cloud.domaine.com/www/lib/private/App/AppManager.php","line":211,"function":"loadApp","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/cloud.domaine.com/www/lib/private/legacy/OC_App.php","line":85,"function":"loadApps","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/cloud.domaine.com/www/remote.php","line":131,"function":"loadApps","class":"OC_App","type":"::"}],"File":"/var/www/cloud.domaine.com/www/apps/files_trackdownloads/lib/AppInfo/Application.php","Line":49,"message":"Could not boot files_trackdownloads: Call to undefined method OC\\Server::getEventDispatcher()","exception":{},"CustomMessage":"Could not boot files_trackdownloads: Call to undefined method OC\\Server::getEventDispatcher()"}}

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

PASTE

Web server / Reverse Proxy

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

PASTE HERE

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": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.domaine.com"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.5.1",
        "overwrite.cli.url": "https:\/\/cloud.domaine.com",
        "nextcloud_url": "https:\/\/cloud.domaine.com",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "default_language": "fr",
        "force_language": "fr",
        "default_locale": "fr_FR",
        "force_locale": "fr_FR",
        "default_phone_region": "fr_FR",
        "logtimezone": "Europe\/Paris",
        "htaccess.RewriteBase": "\/",
        "skeletondirectory": "\/var\/www\/cloud.domaine.com\/skel",
        "filelocking.enabled": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "upgrade.disable-web": "true",
        "maintenance": false,
        "loglevel": 2,
        "trashbin_retention_obligation": "auto,30",
        "activity_expire_days": 365,
        "app_install_overwrite": [
            "files_trackdownloads",
            "files_downloadactivity",
            "apporder"
        ],
        "trusted_poxies": [
            "57.128.37.244"
        ],
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0,
            "dbindex": 0
        },
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis"
    }
}

Apps

The output of occ app:list (if possible).

Enabled:
  - activity: 3.0.0
  - admin_audit: 1.20.0
  - announcementcenter: 7.1.0
  - app_api: 4.0.5
  - apporder: 0.15.0
  - bookmarks: 15.0.5
  - bruteforcesettings: 3.0.0
  - calendar: 5.0.9
  - calendar_resource_management: 0.8.0
  - cloud_federation_api: 1.13.0
  - comments: 1.20.1
  - contacts: 6.1.3
  - cospend: 3.0.10
  - dashboard: 7.10.0
  - dav: 1.31.1
  - deck: 1.14.3
  - external: 5.5.2
  - federatedfilesharing: 1.20.0
  - federation: 1.20.0
  - files: 2.2.0
  - files_accesscontrol: 1.20.1
  - files_automatedtagging: 1.20.0
  - files_downloadlimit: 3.0.0
  - files_external: 1.22.0
  - files_pdfviewer: 3.0.0
  - files_reminders: 1.3.0
  - files_sharing: 1.22.0
  - files_trackdownloads: 1.11.0
  - files_trashbin: 1.20.1
  - files_versions: 1.23.0
  - firstrunwizard: 3.0.0
  - forms: 4.3.5
  - impersonate: 1.17.1
  - logreader: 3.0.0
  - lookup_server_connector: 1.18.0
  - nextcloud_announcements: 2.0.0
  - notes: 4.11.0
  - notifications: 3.0.0
  - notify_push: 1.0.0
  - oauth2: 1.18.1
  - password_policy: 2.0.0
  - passwords: 2024.12.21
  - polls: 7.2.9
  - previewgenerator: 5.7.0
  - privacy: 2.0.0
  - provisioning_api: 1.20.0
  - recommendations: 3.0.0
  - related_resources: 1.5.0
  - richdocuments: 8.5.3
  - serverinfo: 2.0.0
  - settings: 1.13.0
  - sharebymail: 1.20.0
  - spreed: 20.1.3
  - support: 2.0.0
  - survey_client: 2.0.0
  - systemtags: 1.20.0
  - tasks: 0.16.1
  - text: 4.1.0
  - theming: 2.5.0
  - theming_customcss: 1.18.0
  - twofactor_backupcodes: 1.19.0
  - updatenotification: 1.20.0
  - user_status: 1.10.0
  - viewer: 3.0.0
  - webhook_listeners: 1.1.0-dev
  - workflowengine: 2.12.0
Disabled:
  - circles: 30.0.0 (installed 24.0.1)
  - contactsinteraction: 1.11.0 (installed 1.5.0)
  - encryption: 2.18.0
  - files_scripts: 4.1.0 (installed 4.1.0)
  - photos: 3.0.2 (installed 2.5.0)
  - sharelisting: 1.2.0 (installed 1.2.0)
  - suspicious_login: 8.0.0
  - twofactor_nextcloud_notification: 4.0.0
  - twofactor_totp: 12.0.0-dev
  - user_ldap: 1.21.0
  - weather_status: 1.10.0 (installed 1.4.0)

Thanks

Hi Aukfood85,

Thanks for looking up the details on your installation.

Can you quantify that? Does it only impact uploading/downloading via WebDAV? Is the web page opening slowly as well? Is there a difference in throughput between exchanging small files or large files?

Is that when you installed Nextcloud, or did you install it earlier and did it become slow at some point?

What platform does your VM run on? How is network fed to the VM?

1 Like

Can you quantify that? Does it only impact uploading/downloading via WebDAV? Is the web page opening slowly as well? Is there a difference in throughput between exchanging small files or large files?

Very difficullt to quantify this, so in navigation in files directory about 30s to open a page.

Is that when you installed Nextcloud, or did you install it earlier and did it become slow at some point?

No It’s an old installation, vm is deployed since 2022.

What platform does your VM run on? How is network fed to the VM?

OVH Public Cloud on Openstack

Does the fact that the oc_activity table is 16G have any influence on these latencies?

Thanks

That is some quantification, yes :stuck_out_tongue:

Does that imply that getting information ready to be viewed takes long, but then uploading or downloading a file is not excruciatingly slow? Ie, once you start transferring a 500 MB file, it reaches normal speeds?

Did it get slower with ‘hardly noticeable degree’ over time, or was it a quite sudden change from <3 seconds to navigate to a files page to >30 seconds the next week?

I don’t know. I searched the forums and Github for references to oc_activity. There are some people complaining about the size (smaller than yours, but I don’t know what’s normal and also not what the scale of your deployment is), and suggestions how to shrink the amount of data.

One (quiet long) thread attracted my attention. A useful log was mentioned there, mariadb-slow.log, as well as troubleshooting by disabling apps. Their case was “Nextcloud on Docker”, which is not implied by you mentioning “VM” (but that also does not exclude Docker).

You have an app called "files_trackdownloads` force enabled, which bypasses compatibility checks. It appears that app hasn’t been maintained for many years. The error you posted is from that app.

Same goes for the apporder app.

I suggest by starting with disabling those apps.

Can you also attempt the section from the support template that is labeled Web Browser that you left blank?