Nextcloud is very slow on certain js files

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 25.0.3.2
Operating system and version (eg, Ubuntu 20.04): 22.04
Apache or nginx version (eg, Apache 2.4.25): Latest Snap
PHP version (eg, 7.4): Latest Snap

The issue you are facing: Waiting for the backend to compute merged-template-prepend.js - it stops after 60s which makes me think it timeouts.
If i put ‘debug’ => true in config

Is this the first time you’ve seen this error? (Y/N): It has been like this for some time, end of last year.

Steps to replicate it:

  1. Clear cache and reload, takes about 66 sec to get to login form. About 14 sec to load all js and then its halted for the rest of the time.

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

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

$CONFIG = array (
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
    ),
  ),
  'supportedDatabases' => 
  array (
    0 => 'mysql',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  ),
  'log_type' => 'file',
  'logfile' => '/var/snap/nextcloud/current/logs/nextcloud.log',
  'logfilemode' => 416,
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' => 
  array (
    0 => 'xxx',
    1 => 'xxx',
  ),
  'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '25.0.3.2',
  'overwrite.cli.url' => 'http://localhost',
  'trusted_proxies' => 
  array (
    0 => 'xxx',
    1 => 'xxx',
    2 => 'xxx',
    3 => 'xxx',
  ),
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'xxx',
  'installed' => true,
  'instanceid' => 'oci710s1mtpn',
  'skeletondirectory' => '',
  'objectstore' => 
  array (
    'class' => '\\OC\\Files\\ObjectStore\\S3',
    'arguments' => 
    array (
      'bucket' => 'nextcloud',
      'autocreate' => true,
      'key' => 'xxx',
      'secret' => 'xxx',
      'hostname' => 'xxx',
      'port' => 443,
      'use_ssl' => true,
      'region' => 'optional',
      'use_path_style' => true,
    ),
  ),
  'maintenance' => false,
  'loglevel' => '0',
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' => 
  array (
    0 => 'xxx',
    1 => 'xxx',
    2 => 'xxx',
  ),
  'twofactor_enforced_excluded_groups' => 
  array (
  ),
  'mail_domain' => 'xxx',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'nextcloud',
  'mail_smtphost' => 'xxx',
  'mail_smtpport' => '587',
  'data-fingerprint' => 'xxx',
);

PASTE HERE

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

10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /core/css/server.css HTTP/1.1" 200 162866 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /apps/files_rightclick/css/app.css HTTP/1.1" 200 910 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /core/css/guest.css HTTP/1.1" 200 19476 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /apps/theming/css/default.css HTTP/1.1" 200 3750 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /index.php/apps/theming/theme/dark.css?plain=1&v=356a192b HTTP/1.1" 200 3754 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /index.php/apps/theming/theme/default.css?plain=1&v=356a192b HTTP/1.1" 200 3809 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /index.php/apps/theming/theme/light.css?plain=0&v=356a192b HTTP/1.1" 200 3974 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /index.php/apps/theming/theme/dark.css?plain=0&v=356a192b HTTP/1.1" 200 3918 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /index.php/apps/theming/theme/light-highcontrast.css?plain=0&v=356a192b HTTP/1.1" 200 4261 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /index.php/apps/theming/theme/opendyslexic.css?plain=0&v=356a192b HTTP/1.1" 200 1653 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /dist/icons.css HTTP/1.1" 200 218027 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /index.php/apps/theming/theme/dark-highcontrast.css?plain=0&v=356a192b HTTP/1.1" 200 4321 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /dist/core-main.js HTTP/1.1" 200 148968 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /core/l10n/sv.js HTTP/1.1" 200 47613 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /core/js/mimetype.js HTTP/1.1" 200 4204 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /dist/core-files_fileinfo.js HTTP/1.1" 200 1439 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /dist/core-files_client.js HTTP/1.1" 200 12976 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /core/img/logo/logo.svg?v=1 HTTP/1.1" 200 1317 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /core/css/server.css.map HTTP/1.1" 200 22273 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /core/img/app-background.jpg HTTP/1.1" 200 190798 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /core/js/mimetypelist.js HTTP/1.1" 200 7574 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /core/js/select2-toggleselect.js HTTP/1.1" 200 1991 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /dist/core-login.js HTTP/1.1" 200 111314 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /apps/files_sharing/l10n/sv.js HTTP/1.1" 200 21178 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /dist/files_sharing-main.js HTTP/1.1" 200 882 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /apps/files_rightclick/l10n/sv.js HTTP/1.1" 200 1304 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /apps/files_rightclick/js/script.js HTTP/1.1" 200 15385 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /apps/files_rightclick/js/files.js HTTP/1.1" 200 5297 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /apps/theming/l10n/sv.js HTTP/1.1" 200 9055 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /apps/theming/js/theming.js HTTP/1.1" 200 569 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /index.php/apps/theming/theme/light.css?plain=1&v=356a192b HTTP/1.1" 200 3808 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /index.php/apps/theming/theme/light-highcontrast.css?plain=1&v=356a192b HTTP/1.1" 200 3918 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /index.php/apps/theming/theme/dark-highcontrast.css?plain=1&v=356a192b HTTP/1.1" 200 3961 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:51:54 +0000] "GET /dist/core-common.js HTTP/1.1" 200 14249886 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:52:00 +0000] "GET /dist/core-files_fileinfo.js.map?v=d5c54f8e5b3834c089a0 HTTP/1.1" 200 5461 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:52:00 +0000] "GET /dist/core-files_client.js.map?v=366b5a754e04c503dcf6 HTTP/1.1" 200 53615 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:52:00 +0000] "GET /dist/core-main.js.map?v=2b1626a5fa8f7301b18f HTTP/1.1" 200 489894 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:52:00 +0000] "GET /core/img/loading-dark.gif HTTP/1.1" 200 5183 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:52:00 +0000] "GET /dist/files_sharing-main.js.map?v=4c7ee07633a21133e94e HTTP/1.1" 200 2318 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:52:00 +0000] "GET /core/img/favicon.ico HTTP/1.1" 200 3764 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:52:00 +0000] "GET /dist/core-login.js.map?v=b47aaea5be7fe474054b HTTP/1.1" 200 417254 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
10.91.49.245 - - - [24/Feb/2023:12:52:00 +0000] "GET /dist/core-common.js.map?v=387bda7e2cd916f280a7 HTTP/1.1" 200 27766404 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
PASTE HERE

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE
```No errors..