[Bug]: Extremely SLOW Thunderbird calendar editing on fresh NextCloud install with all recommended settings.
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
After confirming this slowness impacts a new/fresh NextCloud Install using all the required versions of software, I reported this in the NextCloud community https://help.nextcloud.com/t/extremely-slow-editing-calendar-in-thunderbird-caldav/216853
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
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
- Sync with Thunderbird using your preferred method. All methods seem to have this issue.*
- Add an event to Thunderbird and select one of the Calendars on the user used to sync in Step 1.
- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CalDAV request path used when Thunderbird adds, edits, or deletes a calendar event, then profile the reported hash-pbkdf2 work and the PHP-FPM processes it triggers. Reproduce the delay with Thunderbird against a fresh Nextcloud 28 installation; done means event changes complete within a few seconds without the reported CPU spike.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100