Skip to content

[Bug]: Spike in CPU usage when editing calendar in Thunderbird CalDAV #47092

Open
@MannyAdumbire

Description

⚠️ This issue respects the following points: ⚠️

Bug description

When adding a making any edits to calendars to ThunderBird calendar app, there is a 5-10 second delay in the UI per-event. CPU usage spikes to full usage. Trying to delete 10 or so events can take over a minute to complete.

Doing a PHP profile revealed a large chuck of time spent running hash-pbkdf2
We are using php-fpm and seeing several new child processes spawned whenever editing calendar.

Steps to reproduce

  1. Sync with Thunderbird using your preferred method. All methods seem to have this issue.*
  2. Add an event to Thunderbird and select one of the Calendars on the user used to sync in Step 1.
  3. Track how long it takes for the event to be added. If it takes several seconds, it may be due to this bug.

*I was not able to reproduce the issue when using other email clients, only seeing this behavior when using Thunderbird.

Expected behavior

Events should reflect on the Thunderbird calendar within a second or two when added.
CPU use shouldn't spike because someone added or deleted a couple appointments.

Installation method

None

Nextcloud Server version

28

Operating system

None

PHP engine version

PHP 8.2

Web server

Nginx

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

Yes

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            ""
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.6.1",
        "overwrite.cli.url": "",
        "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***",
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "updatechecker": false,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "integrity.check.disabled": false,
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": "",
            "timeout": "0.0",
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "hashing_default_password": true,
        "localstorage.allowsymlinks": true,
        "simpleSignUpLink.shown": false,
        "mail_smtpmode": "smtp",
        "mail_smtpauth": 1,
        "mail_sendmailmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "skeletondirectory": "",
        "user_backends": [
            {
                "class": "\\OCA\\UserExternal\\IMAP",
                "arguments": [
                    "",
                    ,
                    "ssl",
                    null,
                    false,
                    true
                ]
            }
        ],
        "maintenance": false,
        "loglevel": 2,
        "maintenance_window_start": 1,
        "default_phone_region": "",
        "defaultapp": "mail",
        "has_rebuilt_cache": true
    },
    "apps": {
        "activity": {
            "enable_email": "no",
            "enabled": "yes",
            "installed_version": "2.20.0",
            "types": "filesystem"
        },
        "appointments": {
            "enabled": "yes",
            "hk": "489fc83d42fe97fbb1a53c51a802f0528dde295320d1eadbeb02410c58b1a3f1",
            "installed_version": "2.1.6",
            "tiv": "8d06ba13e1cda80eed38b0a8dfc0ecce",
            "types": "dav"
        },
        "backgroundjob": {
            "lastjob": "950"
        },
        "bruteforcesettings": {
            "enabled": "yes",
            "installed_version": "2.8.0",
            "types": ""
        },
        "calendar": {
            "enabled": "yes",
            "installed_version": "4.7.10",
            "types": ""
        },
        "carnet": {
            "enabled": "yes",
            "installed_version": "0.25.4",
            "types": "filesystem"
        },
        "circles": {
            "enabled": "no",
            "installed_version": "27.0.1",
            "loopback_tmp_scheme": "https",
            "maintenance_run": "0",
            "maintenance_update": "{\"3\":1705314604,\"2\":1705315203,\"1\":1705315203}",
            "types": "filesystem,dav"
        },
        "cloud_federation_api": {
            "enabled": "yes",
            "installed_version": "1.11.0",
            "types": "filesystem"
        },
        "comments": {
            "enabled": "yes",
            "installed_version": "1.18.0",
            "types": "logging"
        },
        "contacts": {
            "enabled": "yes",
            "installed_version": "5.5.3",
            "types": "dav"
        },
        "contactsinteraction": {
            "enabled": "yes",
            "installed_version": "1.9.0",
            "types": "dav"
        },
        "core": {
            "backgroundjobs_mode": "cron",
            "default_encryption_module": "OC_DEFAULT_MODULE",
            "emailTestSuccessful": "1",
            "encryption_enabled": "yes",
            "files_metadata": "{\"photos-original_date_time\":{\"value\":null,\"type\":\"int\",\"indexed\":true,\"editPermission\":0},\"photos-exif\":{\"value\":null,\"type\":\"array\",\"indexed\":false,\"editPermission\":0},\"photos-ifd0\":{\"value\":null,\"type\":\"array\",\"indexed\":false,\"editPermission\":0},\"photos-size\":{\"value\":null,\"type\":\"array\",\"indexed\":false,\"editPermission\":0}}",
            "files_metadata_installed": "1",
            "installedat": "1704977700.5627",
            "lastcron": "1723001406",
            "lastupdatedat": "0",
            "moveavatarsdone": "yes",
            "newUser.sendEmail": "no",
            "previewsCleanedUp": "1",
            "public_files": "files_sharing\/public.php",
            "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
            "shareapi_allow_share_dialog_user_enumeration": "yes",
            "shareapi_restrict_user_enumeration_to_group": "yes",
            "vendor": "nextcloud"
        },
        "dashboard": {
            "enabled": "no",
            "installed_version": "7.7.0",
            "types": ""
        },
        "dav": {
            "buildCalendarReminderIndex": "yes",
            "buildCalendarSearchIndex": "yes",
            "chunks_migrated": "1",
            "enabled": "yes",
            "generateBirthdayCalendar": "no",
            "installed_version": "1.29.1",
            "regeneratedBirthdayCalendarsForYearFix": "yes",
            "sendEventRemindersPush": "yes",
            "types": "filesystem"
        },
        "encryption": {
            "enabled": "yes",
            "installed_version": "2.16.0",
            "masterKeyId": "",
            "publicShareKeyId": "",
            "recoveryKeyId": "",
            "types": "filesystem"
        },
        "federatedfilesharing": {
            "enabled": "yes",
            "installed_version": "1.18.0",
            "types": ""
        },
        "federation": {
            "enabled": "no",
            "installed_version": "1.17.0",
            "types": "authentication"
        },
        "files": {
            "enabled": "yes",
            "installed_version": "2.0.0",
            "types": "filesystem"
        },
        "files_external": {
            "enabled": "yes",
            "installed_version": "1.20.0",
            "types": "filesystem"
        },
        "files_pdfviewer": {
            "enabled": "yes",
            "installed_version": "2.9.0",
            "types": ""
        },
        "files_reminders": {
            "enabled": "yes",
            "installed_version": "1.1.0",
            "types": "dav"
        },
        "files_rightclick": {
            "enabled": "no",
            "installed_version": "1.6.0",
            "types": ""
        },
        "files_sharing": {
            "enabled": "yes",
            "incoming_server2server_group_share_enabled": "yes",
            "incoming_server2server_share_enabled": "yes",
            "installed_version": "1.20.0",
            "lookupServerEnabled": "no",
            "lookupServerUploadEnabled": "yes",
            "outgoing_server2server_group_share_enabled": "yes",
            "outgoing_server2server_share_enabled": "yes",
            "types": "filesystem"
        },
        "files_trashbin": {
            "enabled": "yes",
            "installed_version": "1.18.0",
            "types": "filesystem,dav"
        },
        "files_versions": {
            "enabled": "yes",
            "installed_version": "1.21.0",
            "types": "filesystem,dav"
        },
        "firstrunwizard": {
            "enabled": "no",
            "installed_version": "2.16.0",
            "types": "logging"
        },
        "groupfolders": {
            "enabled": "yes",
            "installed_version": "16.0.7",
            "types": "filesystem,dav"
        },
        "logreader": {
            "enabled": "yes",
            "installed_version": "2.13.0",
            "shownLevels": "[0,1,2,3,4]",
            "types": "logging"
        },
        "lookup_server_connector": {
            "enabled": "yes",
            "installed_version": "1.16.0",
            "types": "authentication"
        },
        "mail": {
            "allow_new_mail_accounts": "no",
            "enabled": "no",
            "installed_version": "3.7.2",
            "types": ""
        },
        "mail_roundcube": {
            "emailAddressChoice": "userIdEmail",
            "enabled": "no",
            "externalLocation": "",
            "forceSSO": "1",
            "installed_version": "1.1.1",
            "types": ""
        },
        "nextcloud_announcements": {
            "enabled": "no",
            "installed_version": "1.16.0",
            "pub_date": "Thu, 24 Oct 2019 00:00:00 +0200",
            "types": "logging"
        },
        "notes": {
            "enabled": "no",
            "installed_version": "4.10.0",
            "types": ""
        },
        "notifications": {
            "enabled": "yes",
            "installed_version": "2.16.0",
            "types": "logging"
        },
        "oauth2": {
            "enabled": "yes",
            "installed_version": "1.16.3",
            "types": "authentication"
        },
        "password_policy": {
            "enabled": "no",
            "installed_version": "1.17.0",
            "types": "authentication"
        },
        "photos": {
            "enabled": "yes",
            "installed_version": "2.4.0",
            "lastPlaceMappedUser": "",
            "lastPlaceMappingDone": "true",
            "types": "dav,authentication"
        },
        "privacy": {
            "enabled": "no",
            "installed_version": "1.11.0",
            "readableLocation": "",
            "types": ""
        },
        "provisioning_api": {
            "enabled": "yes",
            "installed_version": "1.18.0",
            "types": "prevent_group_restriction"
        },
        "recommendations": {
            "enabled": "no",
            "installed_version": "1.6.0",
            "types": ""
        },
        "related_resources": {
            "enabled": "no",
            "installed_version": "1.3.0",
            "types": ""
        },
        "serverinfo": {
            "cached_count_filecache": "8048",
            "cached_count_storages": "18",
            "enabled": "yes",
            "installed_version": "1.18.0",
            "types": ""
        },
        "settings": {
            "enabled": "yes",
            "installed_version": "1.10.1",
            "profile_enabled_by_default": "0",
            "types": ""
        },
        "sharebymail": {
            "enabled": "no",
            "installed_version": "1.17.0",
            "types": "filesystem"
        },
        "side_menu": {
        },
        "snappymail": {
            "enabled": "no",
            "installed_version": "2.36.1",
            "snappymail-autologin": "1",
            "snappymail-autologin-with-email": "",
            "snappymail-no-embed": "",
            "types": ""
        },
        "support": {
            "enabled": "no",
            "installed_version": "1.10.0",
            "types": "session"
        },
        "survey_client": {
            "enabled": "no",
            "installed_version": "1.15.0",
            "types": ""
        },
        "systemtags": {
            "enabled": "no",
            "installed_version": "1.17.0",
            "types": "logging"
        },
        "tasks": {
            "enabled": "yes",
            "installed_version": "0.16.0",
            "types": ""
        },
        "text": {
            "enabled": "yes",
            "installed_version": "3.9.1",
            "types": "dav"
        },
        "theming": {
            "backgroundMime": "backgroundColor",
            "cachebuster": "43",
            "color": "#E5E7EB",
            "disable-user-theming": "yes",
            "enabled": "yes",
            "faviconMime": "image\/svg+xml",
            "installed_version": "2.3.0",
            "logoMime": "image\/png",
            "logoheaderMime": "image\/png",
            "name": "",
            "slogan": "***REMOVED SENSITIVE VALUE***",
            "types": "logging",
            "url": "***REMOVED SENSITIVE VALUE***"
        },
        "twofactor_backupcodes": {
            "enabled": "yes",
            "installed_version": "1.17.0",
            "types": ""
        },
        "updatenotification": {
            "enabled": "no",
            "installed_version": "1.17.0",
            "types": ""
        },
        "user_external": {
            "enabled": "yes",
            "installed_version": "3.3.0",
            "types": "prelogin,authentication"
        },
        "user_ldap": {
            "background_sync_interval": "1800",
            "enabled": "yes",
            "installed_version": "1.19.0",
            "s01_lastChange": "1704977719",
            "s01ldap_configuration_active": "",
            "types": "authentication"
        },
        "user_status": {
            "enabled": "no",
            "installed_version": "1.7.0",
            "types": ""
        },
        "viewer": {
            "enabled": "yes",
            "installed_version": "2.2.0",
            "types": ""
        },
        "weather_status": {
            "enabled": "no",
            "installed_version": "1.7.0",
            "types": ""
        },
        "workflowengine": {
            "enabled": "yes",
            "installed_version": "2.10.0",
            "types": "filesystem"
        }
    }
}

List of activated Apps

No response

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

nexcloud-slow-cal-profile-pbkdf2 copy
nexcloud-slow-cal-top-php

Activity

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

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions