Nextcloud sloooooooooow / unusable after migration from Debian 10 to Debian 12

I have just migrated a server from Debian 10 to Debian 12. Both makes use of ISPconfig3 on LAMP and I used their ISPcopy for the migration, thereby just making a clone of all related to ISPconfig (sites, email, some config files, to the original site). Both servers are VMs on top of Proxmox. I have regenerated all certificates on the new server. From working perfectly on the old server with Nextcloud, it is now not possible to use it. It is slooooooooooooow! It has redefined the meaning of slow. :slight_smile: (the max_execution_time in php.ini is set to 300). Just 2 times (out of 30 or so) I have managed to get logged in, but it stopped there. It was not possible to use it.

Nextcloud version : 24.0.6.1
Operating system and version: Debian 12
Apache version: Apache/2.4 (Debian)
PHP version : 8.0

Details of Debian:

New server:
Static hostname: sv01
Icon name: computer-vm
Chassis: vm 🖴
Virtualization: kvm
Operating System: Debian GNU/Linux 12 (bookworm)
Kernel: Linux 6.1.0-12-amd64
Architecture: x86-64

Old server:
Static hostname: si0001
Icon name: computer-vm
Chassis: vm
Virtualization: kvm
Operating System: Debian GNU/Linux 10 (buster)
Kernel: Linux 4.19.0-25-amd64
Architecture: x86-64

The issue you are facing:

Is this the first time you’ve seen this error? Yes

Steps to replicate it:

  1. Migrate from Debian 10 on one VM to Debian 12 on another VM :slight_smile:

The output of your Nextcloud log in Admin > Logging:

(pls see below in pastebin)

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

<?php
$CONFIG = array (
  'instanceid' => 'ocmnyhwyvxe0',
  'passwordsalt' => '7+KZBjJBPUMR86DM-hallelujah-VSk2k1OPzC4eF/',
  'secret' => 'GCc3f1sTjApfUh-some-secret-fw+qaGR4Ju3Pe4Vrk3Q+zEs',
  'trusted_domains' =>
  array (
    0 => 'MYDOMAIN',
    1 => 'ANOTHER-OF-MYDOMAINS',
  ),
  'datadirectory' => '/var/www/clients/client1/web94/web/data',
  'dbtype' => 'mysql',
  'version' => '24.0.6.1',
  'overwrite.cli.url' => 'https://MYDOMAIN',
  'dbname' => 'MYDBNAME',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'MYDBUSER',
  'dbpassword' => 'MYDBPASS',
  'installed' => true,
  'mail_from_address' => 'no.reply',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_domain' => 'mydomain',
  'mail_smtphost' => 'mydomain',
  'mail_smtpport' => '587',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'app_install_overwrite' =>
  array (
    0 => 'apporder',
    1 => 'rainloop',           /* but I use Snappymail */
  ),
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'no.reply@mydomain',
  'mail_smtppassword' => 'MYPASSWORD',
);


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

<MY_DOMAIN>:443 <MY_IP> - - [04/Oct/2023:03:03:45 +0200] "GET /status.php HTTP/1.1" 200 6319 "-" "Mozilla/5.0 (Windows) mirall/3.9.0stable-Win64 (build 20230613) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
<MY_DOMAIN>:443 <MY_IP> - - [04/Oct/2023:03:03:46 +0200] "PROPFIND /remote.php/dav/files/<MY_NAME>/ HTTP/1.1" 207 1174 "-" "Mozilla/5.0 (Windows) mirall/3.9.0stable-Win64 (build 20230613) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
<MY_DOMAIN>:443 <MY_IP> - - [04/Oct/2023:03:04:44 +0200] "GET /ocs/v1.php/cloud/user?format=json HTTP/1.1" 200 6596 "-" "Mozilla/5.0 (Windows) mirall/3.9.0stable-Win64 (build 20230613) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
<MY_DOMAIN>:443 <MY_IP> - - [04/Oct/2023:03:05:04 +0200] "GET /remote.php/dav/avatars/<MY_NAME>/128.png HTTP/1.1" 200 27827 "-" "Mozilla/5.0 (Windows) mirall/3.9.0stable-Win64 (build 20230613) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
<MY_DOMAIN>:443 <MY_IP> - - [04/Oct/2023:03:03:47 +0200] "GET /ocs/v1.php/cloud/capabilities?format=json HTTP/1.1" 200 3592 "-" "Mozilla/5.0 (Windows) mirall/3.9.0stable-Win64 (build 20230613) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
<MY_DOMAIN>:443 <MY_IP> - - [04/Oct/2023:03:05:24 +0200] "GET /ocs/v2.php/apps/notifications/api/v2/notifications?format=json HTTP/1.1" 304 6038 "-" "Mozilla/5.0 (Windows) mirall/3.9.0stable-Win64 (build 20230613) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
<MY_DOMAIN>:443 <MY_IP> - - [04/Oct/2023:03:05:24 +0200] "GET /ocs/v2.php/core/navigation/apps?absolute=true&format=json HTTP/1.1" 304 6004 "-" "Mozilla/5.0 (Windows) mirall/3.9.0stable-Win64 (build 20230613) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
<MY_DOMAIN>:443 <MY_IP> - - [04/Oct/2023:03:05:24 +0200] "GET /ocs/v2.php/core/navigation/apps?absolute=true&format=json HTTP/1.1" 304 6004 "-" "Mozilla/5.0 (Windows) mirall/3.9.0stable-Win64 (build 20230613) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
<MY_DOMAIN>:443 <MY_IP> - - [04/Oct/2023:03:05:24 +0200] "PROPFIND /remote.php/dav/files/<MY_NAME>/ HTTP/1.1" 207 7517 "-" "Mozilla/5.0 (Windows) mirall/3.9.0stable-Win64 (build 20230613) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
<MY_DOMAIN>:443 <MY_IP> - - [04/Oct/2023:03:05:41 +0200] "GET /ocs/v2.php/apps/notifications/api/v2/notifications?format=json HTTP/1.1" 304 6038 "-" "Mozilla/5.0 (Windows) mirall/3.9.0stable-Win64 (build 20230613) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
<MY_DOMAIN>:443 <MY_IP> - - [04/Oct/2023:03:08:55 +0200] "GET /status.php HTTP/1.1" 404 6300 "-" "Mozilla/5.0 (Windows) mirall/3.9.0stable-Win64 (build 20230613) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)"

-------

Output errors in nextcloud.log :

https://pastebin.com/GvyKbfWb

(there are plenty more entries in the nextcloud file, but it's with other timestamps)

------

Please note that ALL other web sites on the new VM is running as expected. Both VMs run on the same HW (Dual Xeons with a total of 48 threads (I used 44 vCPUs), NVMe disks, 256 GB RAM, 1 Gbps NIC and connection)

What do the various resources utilization indicators suggest is going on when things are slow?

My first guess: your PHP settings are not the same. Namely OPcache maybe isn’t enabled.

Pay particularly attention to the fact that PHP doesn’t use the same config files necessarily across run modes (CLI vs mod_php) nor versions. If you’re using PHP 8.0 in mod_php mode in Debian 12 you must be using a PPA since 8.2 is what’s in Bookwork now.

But there are numerous other possibilities.

You’re also running a no longer supported version of NC, but that’s a different matter.

1 Like

Thanks for your prompt reply!
yes, I realize that I am running on an old version. I have just started the upgrade.

PHP settings are the same. I did an rsync of the php.ini files (on my ISPconfig panel I have setup the ability to choose what PHP version I want to use).

The cache is a good idea, but knowing that I actually never really manage to get logged in, I think it’s something else.

Thanks! Food for thought and some actions. I appreciate your comment and ideas!

I gave up. :slight_smile: There were 32 updates to apply, so instead of doing that I exported what I could, and then deleted the installation and made a new install. Kind of drastic, but at least it was faster. I still have some configs to do though…