2nd NC Web server very slow, wheel on browser tab never stops spinning

[/details]

Nextcloud version (eg, 12.0.2): 15.02
Operating system and version (eg, Ubuntu 17.04): 16.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.37
PHP version (eg, 7.1): 7.3

The issue you are facing:
We have built a 2nd web front end for Nextcloud. It is coming up, but it is extremely slow. it takes about 1.5mins before the page will display your home directory. If you click on Settings, it takes almost 4 minutes for the page to load. This is only an issue on our 2nd WFE.

For the creation of the server, we cloned the OS server so they are exactly the same. In another forum article, someone said to just copy over the /Nextcloud folder in order to setup the second machine with the same configuration. This only worked once. Then we started getting an internal server error message.

I found that if I deleted the config.php file and recreated it with a new instanceID and then copied the rest of the entries over from the working PHP file on the webserver1 that the site then would come up, but I am experiencing the problem I have now of it being very slow.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Login
  2. Choose Anything

The output of your Nextcloud log in Admin > Logging:

Took over 5 minutes to display this info.... 

	core	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T14:00:04-0800
Error	core	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T14:00:04-0800
Error	index	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T14:00:04-0800
Error	index	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T14:00:04-0800
Error	core	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:37:11-0800
Error	core	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:37:11-0800
Error	index	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:37:11-0800
Error	index	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:37:11-0800
Error	core	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:36:37-0800
Error	core	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:36:37-0800
Error	index	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:36:37-0800
Error	index	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:36:37-0800
Error	core	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:25:09-0800
Error	core	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:25:09-0800
Error	index	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:25:09-0800
Error	index	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:25:09-0800
Error	core	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:19:53-0800
Error	core	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:19:53-0800
Error	index	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:19:53-0800
Error	index	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:19:53-0800
Error	core	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:13:21-0800
Error	core	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:13:21-0800
Error	index	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:13:21-0800
Error	index	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:13:21-0800
Error	core	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:13:19-0800
Error	core	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:13:19-0800
Error	index	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:13:19-0800
Error	index	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:13:19-0800
Error	core	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:12:56-0800
Error	core	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:12:56-0800
Error	index	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:12:56-0800
Error	index	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:12:56-0800
Error	core	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:12:32-0800
Error	core	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:12:32-0800
Error	index	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:12:32-0800
Error	index	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache	
2019-01-22T13:12:32-0800
Error	PHP	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache at /var/www/html/nextcloud/lib/private/Memcache/Factory.php#99	
2019-01-22T13:12:03-0800
Error	PHP	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache at /var/www/html/nextcloud/lib/private/Memcache/Factory.php#99	
2019-01-22T13:11:33-0800
Error	PHP	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache at /var/www/html/nextcloud/lib/private/Memcache/Factory.php#99	
2019-01-22T13:11:03-0800
Error	PHP	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache at /var/www/html/nextcloud/lib/private/Memcache/Factory.php#99	
2019-01-22T13:10:33-0800
Error	PHP	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache at /var/www/html/nextcloud/lib/private/Memcache/Factory.php#99	
2019-01-22T13:10:03-0800
Error	PHP	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache at /var/www/html/nextcloud/lib/private/Memcache/Factory.php#99	
2019-01-22T13:09:33-0800
Error	PHP	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache at /var/www/html/nextcloud/lib/private/Memcache/Factory.php#99	
2019-01-22T13:09:03-0800
Error	PHP	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache at /var/www/html/nextcloud/lib/private/Memcache/Factory.php#99	
2019-01-22T13:08:33-0800
Error	PHP	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache at /var/www/html/nextcloud/lib/private/Memcache/Factory.php#99	
2019-01-22T13:08:03-0800
Error	PHP	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache at /var/www/html/nextcloud/lib/private/Memcache/Factory.php#99	
2019-01-22T13:08:00-0800
Error	PHP	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache at /var/www/html/nextcloud/lib/private/Memcache/Factory.php#99	
2019-01-22T13:07:33-0800
Error	PHP	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache at /var/www/html/nextcloud/lib/private/Memcache/Factory.php#99	
2019-01-22T13:07:30-0800
Error	PHP	OC\HintException: Memcache \OC\Memcache\APCu not available for local cache at /var/www/html/nextcloud/lib/private/Memcache/Factory.php#99	
2019-01-22T13:07:03-0800
Error	PHP	OC\HintException: Memcache \OC\Memcache\APCu not available for lo

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'oc6flkbn49yn',
  'passwordsalt' => 'd7DGMGEkYWoOYKsls8yCRjuN/ZInp+',
  'secret' => '9PSUGMXYRmMbZBGy0as+CEKPbd5r902MrCbYHWKkG5zL7noU',
  'trusted_domains' =>
  array (
    0 => 'testhqncws1.domain.local',
    1 => 'testhqncws2.domain.local',
    2 => 'testhqncws1',
    3 => 'testhqncws2',
    4 => '10.1.1.117',
    5 => '10.1.1.224',
    6 => '10.1.1.33',
    7 => 'testbox.domain.com',
  ),
  'datadirectory' => '/mnt/nc-data/data',
  'dbtype' => 'mysql',
  'version' => '15.0.2.0',
  'overwrite.cli.url' => 'https://testbox.domain.com/',
  'dbname' => 'nextcloud',
  'dbhost' => 'testhqncmdb',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_itadmin4',
  'dbpassword' => 'vnU0tubInitBZ5SReuMbKebOeVpXBk',
  'installed' => true,
  'mail_from_address' => 'nextcloudadmin',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'domain.com',
  'mail_smtpauthtype' => 'NTLM',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '10.1.1.60',
  'mail_smtpname' => 'nextcloudadmin',
  'mail_smtppassword' => 'N3xtcl0ud',
#  'memcache.local' => '\OC\Memcache\APCu'

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

not using nginx