Nextcloud page takes a long time to load or hangs

Hello everyone,
I am actually relatively satisfied with Nextcloud Aio Installation but from the start I have a topic that I want to accept less and less. I put a lot of money into a small private computer to let Proxmox run very performant. On that I have a VM and the NextCloud Aio installation on it. Currently I have 32GB Memory for my VM and I also use expensive industry SSD.

But I don’t know what exactly my problem is …

When I call the Nextcloud page, login or change between the apps, it is as follows:
No matter which browser, whether Firefox or Brave does not completely load the page. The page only load when I cancel the loading of the side in the browser or do a refresh from the side. This happens very, very often. In Proxmox I don’t see that the VM is somehow under load. I have no idea where I have to start here.
Does anyone have any idea where I should look?

  • Post the output of occ config:list system (your config)
  • Check your browser inspector to see what transactions it hanging on (Network tab)
  • Review your nextcloud.log for any possible culprits (errors, warnings, etc.)

@jtr Thanks you for you time…

  • Here is my config:
<?php
$CONFIG = array (
  'one-click-instance' => true,
  'one-click-instance.user-limit' => 100,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'appsallowlist' => false,
  'check_data_directory_permissions' => false,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'nextcloud-aio-redis',
    'password' => '......',
    'port' => 6379,
  ),
  'overwritehost' => 'MYURL',
  'overwriteprotocol' => 'https',
  'passwordsalt' => '........',
  'secret' => '.......',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'MYURL',
    2 => 'ANOTHERURL',
    3 => '192.168.1.12',
  ),
  'datadirectory' => '/mnt/ncdata',
  'dbtype' => 'pgsql',
  'version' => '29.0.4.1',
  'overwrite.cli.url' => 'https://MYURL/',
  'dbname' => 'nextcloud_database',
  'dbhost' => 'nextcloud-aio-database',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_nextcloud',
  'dbpassword' => '.....',
  'installed' => true,
  'instanceid' => '.....',
  'maintenance' => false,
  'maintenance_window_start' => 1,
  'default_phone_region' => 'DE',
  'updatedirectory' => '/nc-updater',
  'loglevel' => '2',
  'log_type' => 'file',
  'logfile' => '/var/www/html/data/nextcloud.log',
  'log_rotate_size' => '10485760',
  'log.condition' => 
  array (
    'apps' => 
    array (
      0 => 'admin_audit',
    ),
  ),
  'preview_max_x' => 1024,
  'preview_max_y' => 1024,
  'jpeg_quality' => 60,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\Imaginary',
    1 => 'OC\\Preview\\MP3',
    2 => 'OC\\Preview\\TXT',
    3 => 'OC\\Preview\\OpenDocument',
    4 => 'OC\\Preview\\Movie',
    5 => 'OC\\Preview\\Krita',
    6 => 'OC\\Preview\\HEIC',
    7 => 'OC\\Preview\\TIFF',
    8 => 'OC\\Preview\\Image',
  ),
  'enable_previews' => true,
  'upgrade.disable-web' => true,
  'mail_smtpmode' => 'smtp',
  'trashbin_retention_obligation' => 'auto, 30',
  'versions_retention_obligation' => 'auto, 30',
  'activity_expire_days' => '30',
  'simpleSignUpLink.shown' => false,
  'share_folder' => '/Shared',
  'one-click-instance.link' => 'https://nextcloud.com/all-in-one/',
  'upgrade.cli-upgrade-link' => 'https://github.com/nextcloud/all-in-one/discussions/2726',
  'allow_local_remote_servers' => true,
  'davstorage.request_timeout' => 3600,
  'htaccess.RewriteBase' => '/',
  'dbpersistent' => false,
  'files_external_allow_create_new_local' => false,
  'trusted_proxies' => 
  array (
    0 => '127.0.0.1',
    1 => '::1',
    2 => '172.18.0.1',
    3 => '172.19.0.1',
    4 => '127.0.0.1',
    10 => '172.18.0.0/16',
  ),
  'preview_imaginary_url' => 'http://nextcloud-aio-imaginary:9000',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'webmaster',
  'mail_domain' => 'MYURL',
  'mail_smtphost' => 'smtp.provider.de',
  'mail_smtpport' => '587',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'webmaster@MYURL',
  'mail_smtppassword' => '.....',
  'memories.exiftool' => '/var/www/html/custom_apps/memories/bin-ext/exiftool-amd64-musl',
  'memories.vod.path' => '/var/www/html/custom_apps/memories/bin-ext/go-vod-amd64',
  'memories.vod.ffmpeg' => '/usr/bin/ffmpeg',
  'memories.vod.ffprobe' => '/usr/bin/ffprobe',
  'preview_imaginary_key' => '6fadc047334f6eae500c18cb174db81576e62b4106f38d29',
  'memories.gis_type' => 2,
  'memories.db.triggers.fcu' => true,
  'auth.bruteforce.protection.enabled' => true,
  'ratelimit.protection.enabled' => true,
  'memories.vod.disable' => false,
);

  • Nothing would have happened in the nextcloud.log file the during this time, I checked it with a tail - f.

Hi, do you see some warnings if you open the admin overview?

Also, is the correct ip-address logged if you fail a login?

In the admin overview I have now entry during the time period when I try to load a page. Currently I have a lot of entry because of the mail APP and about a not responsible IMAP server. Because of some problems with the mail APP I will deactivate it now and then I will check again the admin overview in the next time.

About the correct ip-address.
I have a VM with an NginxProxManager in front of my Nextcloud VM. I have a problem with forwarding the external IP via the NPM, it just doesn’t work for me. So I think I always connect to Nextcloud as localhost and it is registered as a trusted host :frowning: So I don’t think I can block myself.

I think this is your issue.

You could try to follow What if the correct remote ip-address is not shown in the Nextcloud logs when login fails? · nextcloud/all-in-one · Discussion #2045 · GitHub

Ok, do you think first I have to remove the trusted proxy entries from my config to see if I will block then after login failures?

I’m trying to implement the link, but I’m afraid it’s too much for me. Could there also be a misconfiguration in my NPM host? This is what is defined in NPM on my host.

client_body_buffer_size 512k;
proxy_read_timeout 86400s;
client_max_body_size 0;
proxy_set_header X-Real-IP  $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $server;

You could first follow the insructions that I sent:

  1. First, check the admin overview in https://yourdomain.com/settings/admin/overview if there is an ip-address shown as brute-force throttled, that should be added to the trusted_proxies list. If so, you can add it with sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ config:system:set trusted_proxies 2 --value="ip.address.that.is.shown" - of course you need to adjust ip.address.that.is.shown to the one that is shown in the admin overview. After a reboot of the Nextcloud container, there should not be any further throttling and the correct ip-address should be logged in the Nextcloud logs when login fails. If that should not be the case, see below:

I have now done the first point as you described. I don’t see any blocks. Currently I only have this entry very often in the log.

Allowed memory size of 536870912 bytes exhausted (tried to allocate 163840 bytes) at /var/www/html/custom_apps/recognize/lib/Clustering/MrdBallTree.php#449 

Do you know what does this mean and how do I get rid of it?
However, I have now also carried out an update by restarting the Nextcloud AIO container. Now everything looks fine. The pages load very quickly and the memories gallery is also very fast. I would just like to get rid of the error as described above and then keep watching how the system is running in the next time…

EDIT: Still everything is fine… also fix this log entry about memory size by increase the memory limit for php.
https://github.com/nextcloud/all-in-one?tab=readme-ov-file#how-to-adjust-the-php-memory-limit-for-nextcloud