<?php
$CONFIG = array (
'instanceid' => 'eR3Aezaf',
'passwordsalt' => 'eew9Taev',
'secret' => 'Peke9aeV',
'trusted_domains' =>
array (
0 => 'cloud.example.org',
),
'datadirectory' => '/var/www/nextcloud/data',
'overwrite.cli.url' => 'https://cloud.example.org',
'dbtype' => 'mysql',
'version' => '12.0.0.29',
'dbname' => 'nextcloud',
'dbhost' => 'db.example.org',
'dbtableprefix' => 'oc_',
'dbuser' => 'admin',
'dbpassword' => 'eiMai5ai',
'default_language' => 'en',
'knowledgebaseenabled' => true,
'enable_avatars' => true,
'auth.bruteforce.protection.enabled' => true,
'trusted_proxies' =>
array (
0 => 'proxy.example.org',
),
'forwarded_for_headers' =>
array (
0 => 'HTTP_X_FORWARDED_FOR',
),
'trashbin_retention_obligation' => 'auto',
'log_type' => 'owncloud',
'logfile' => '/var/log/nextcloud.log',
'loglevel' => 2,
'installed' => true,
'forcessl' => true,
'forceSSLforSubdomains' => true,
'mail_smtpmode' => 'smtp',
'mail_from_address' => 'no-reply',
'ldapIgnoreNamingRules' => false,
'mail_domain' => 'example.org',
'mail_smtpauth' => 1,
'mail_smtphost' => 'mail.example.org',
'mail_smtpport' => '587',
'mail_smtpname' => 'no-reply',
'mail_smtppassword' => 'eic9Oodu',
'mail_smtpauthtype' => 'LOGIN',
'theme' => '',
'defaultapp' => 'apporder',
'overwritehost' => 'cloud.example.org',
'overwriteprotocol' => 'https',
'maintenance' => false,
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'memcache.local' => '\\OC\\Memcache\\APCu',
'redis' =>
array (
'host' => 'localhost',
'port' => 6379,
),
'asset-pipeline.enabled' => true,
'appstoreenabled' => true,
'appstoreurl' => 'https://apps.nextcloud.com/api/v0',
'customclient_android' => 'https://f-droid.org/packages/com.nextcloud.client/',
'appstore.experimental.enabled' => true,
'mail_smtpsecure' => 'tls',
'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
'updater.release.channel' => 'stable',
'mysql.utf8mb4' => true,
);
Steps to reproduce
Expected behavior
Contact app should display your contacts and relatively fast prepare to add new contacts
Actual behaviour
Contact app takes about 5 sec to fully load. Each time you press add new contact or remove contact it takes about 4-5sec to process. The CPU on database server goes to 100%.
Server configuration
Operating system: Debian jessie
Web server: nignx
Database: mariadb 10.0.31
PHP version: 7.0.22
Nextcloud version: 12.0.0.29
Updated from an older Nextcloud/ownCloud or fresh install: Updated way back from owncloud(nc10 i think)
Where did you install Nextcloud from:
Signing status:
Signing status
List of activated apps:
Affected with all apps disabled (apart form files and contacts)
Nextcloud configuration:
Are you using encryption: yes
Are you using an external user-backend, if yes which one: LDAP
While investigating, I enabled slow-query. Result of which is 99% of queries logged as slow are Contact related. The top slow query is ;
As stated in the forum post: https://help.nextcloud.com/t/database-performance-issue/19583/3 mysqltunner yells about many joins performed without indexes and suggests to top up join-buffer-size. Currently at 16M but I went as far as 64M and mysqltunner just kept suggesting more, so I dont think it's the way to go. I did not notice any disk IO issue and I have plenty or RAM to cache.
I hope someone here has some ideas on what could be going wrong. If you need more info please ask.
I've tested my setup on separate server (same db) with only one user connected and no load whatsoever and the results were the same. As soon as I went to Contact app the CPU went through the roof.