Nextcloud UI loading time

Nextcloud version: 25.0.2
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): nginx 1.18.0-0ubuntu1.4
PHP version (eg, 7.4): PHP 8.0.25
DB: PostgreSQL 13.8-1.pgdg20.04+1
RAM: 128GB
CPU: 24 Cores
Redis Cache

Nextcloud’s Web UI has become incredibly slow for no apparent reason. On average, it takes about 10-15 seconds to navigate from folder to folder, or opening the Files tab.
We have an SMB mounted storage which all users are accessing and it’s been used all the time.

Looking at the back-end, there are multiple postgres processes taking a huge amount of resources. All queries on the DB are the same, there are about 30 of them and aren’t going away.

SELECT "filecache"."fileid", "storage", "path", "path_hash", "filecache"."parent", "filecache"."name", "mimetype", "mimepart", "size", "mtime", "storage_mtime", "encrypted", "etag", "permissions", "checksum", "unencrypted_size", "metadata_etag", "creation_time", "upload_time" FROM "oc_filecache" "filecache" LEFT JOIN "oc_filecache_extended" "fe" ON "filecache"."fileid" = "fe"."fileid" WHERE ("storage" = $1) AND ("path_hash" = $2) | active | 30

Before we weren’t getting such queries, or they weren’t so resource hungry. Has anything changed and what can we do to minimize the impact on the system ?

Also, so far this seems to be affecting only the Web part, all downloads done through the clients are running fine.

Please check also browser dev tools F12 for network and debug.

There are lots of warning like these ones, but nothing critical.

Also, those are the enabled apps:

  - activity: 2.17.0
  - admin_audit: 1.15.0
  - bruteforcesettings: 2.5.0
  - cloud_federation_api: 1.8.0
  - comments: 1.15.0
  - contactsinteraction: 1.6.0
  - dashboard: 7.5.0
  - dav: 1.24.0
  - federatedfilesharing: 1.15.0
  - federation: 1.15.0
  - files: 1.20.1
  - files_external: 1.17.0
  - files_pdfviewer: 2.6.0
  - files_rightclick: 1.4.0
  - files_sharing: 1.17.0
  - files_trashbin: 1.15.0
  - files_versions: 1.18.0
  - firstrunwizard: 2.14.0
  - logreader: 2.10.0
  - lookup_server_connector: 1.13.0
  - nextcloud_announcements: 1.14.0
  - notifications: 2.13.1
  - oauth2: 1.13.0
  - password_policy: 1.15.0
  - photos: 2.0.1
  - privacy: 1.9.0
  - provisioning_api: 1.15.0
  - recommendations: 1.4.0
  - related_resources: 1.0.3
  - serverinfo: 1.15.0
  - settings: 1.7.0
  - support: 1.8.0
  - systemtags: 1.15.0
  - text: 3.6.0
  - theming: 2.0.1
  - twofactor_backupcodes: 1.14.0
  - twofactor_email: 2.7.1
  - twofactor_nextcloud_notification: 3.5.0
  - twofactor_totp: 7.0.0
  - updatenotification: 1.15.0
  - user_ldap: 1.15.0
  - user_status: 1.5.0
  - user_usage_report: 1.9.0
  - viewer: 1.9.0
  - weather_status: 1.5.0
  - workflowengine: 2.7.0