Caching CSS / speed up stylesheet loading

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): 22.2.0
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.3
Apache or nginx version (eg, Apache 2.4.25): 2.4.50
PHP version (eg, 7.4): 8.0-FPM

The issue you are facing:
CSS takes long to be loaded

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

Steps to replicate it:

  1. Run Nextcloud.

I am using opcache, APCu & Redis for caching - mostly setup according to differenct online manuals adopted for my personal use.

Most stylesheets take ~ 1 second to be loaded which results that the “FIles” page is loaded after ~ 5 seconds (on LAN).

My VM configuration:

24 GB RAM
8 cores
Main OS disk including Nextcloud config runs on a NVMe SSD.
Nextcloud storage is a dedicated RAID1 SATA SSD.

The output of your Nextcloud log in Admin > Logging:

No useful information

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

<?php
$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxxx',
  'trusted_domains' =>
  array (
    0 => 'xxxt',
  ),
  'datadirectory' => '/mnt/cloud/nextcloud/',
  'overwrite.cli.url' => 'xxx',
  'dbtype' => 'pgsql',
  'version' => '22.2.0.2',
  'dbname' => 'nextcloud',
  'dbhost' => 'xxxx:5432',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'xxx',
  'logtimezone' => 'Europe/Vienna',
  'installed' => true,
  'filelocking.enabled' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'mail_smtpmode' => 'smtp',
  'mail_domain' => 'xxxx',
  'mail_from_address' => 'cloud',
  'updater.release.channel' => 'stable',
  'loglevel' => 0,
  'appstore.experimental.enabled' => true,
  'theme' => '',
  'asset-pipeline.enable' => true,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'remember_login_cookie_lifetime' => 1296000,
  'session_lifetime' => 86400,
  'session_keepalive' => true,
  'auto_logout' => false,
  'trashbin_retention_obligation' => 'auto, 7',
  'mysql.utf8mb4' => true,
  'mail_smtpauthtype' => 'xxxx',
  'mail_smtphost' => 'xxxx',
  'mail_smtpport' => '25',
  'htaccess.RewriteBase' => '/',
  'maintenance' => false,
  'activity_expire_days' => 14,
  'auth.bruteforce.protection.enabled' => true,
  'blacklisted_files' =>
  array (
    0 => '.htaccess',
    1 => 'Thumbs.db',
    2 => 'thumbs.db',
  ),
  'cron_log' => true,
  'enable_previews' => true,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\Movie',
    6 => 'OC\\Preview\\PDF',
    7 => 'OC\\Preview\\MP3',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\MarkDown',
  ),
  'filesystem_check_changes' => 0,
  'integrity.check.disabled' => false,
  'knowledgebaseenabled' => true,
  'log_rotate_size' => 104857600,
  'quota_include_external_storage' => false,
  'app_install_overwrite' =>
  array (
    0 => 'files_fulltextsearch',
    1 => 'bruteforcesettings',
    2 => 'checksum',
    3 => 'contacts',
    4 => 'drawio',
    5 => 'fulltextsearch',
    6 => 'onlyoffice',
    7 => 'files_fulltextsearch_tesseract',
    8 => 'fulltextsearch_elasticsearch',
    9 => 'maps',
    10 => 'extract',
    11 => 'breezedark',
    12 => 'flowupload',
    13 => 'ransomware_detection',
    14 => 'ransomware_protection',
    15 => 'metadata',
    16 => 'groupfolders',
    17 => 'talk_matterbridge',
    18 => 'whiteboard',
    19 => 'dicomviewer',
    20 => 'bookmarks',
    21 => 'twofactor_nextcloud_notification',
    22 => 'files_retention',
    23 => 'files_downloadactivity',
    24 => 'workflow_pdf_converter',
    25 => 'facerecognition',
    26 => 'health',
    27 => 'previewgenerator',
    28 => 'quota_warning',
    29 => 'recognize',
    30 => 'video_converter',
    31 => 'forms',
    32 => 'riotchat',
  ),
  'mail_sendmailmode' => 'smtp',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'xxxx',
  'mail_smtppassword' => 'xxxx',
  'preview_max_x' => '2048',
  'preview_max_y' => '2045',
  'jpeg_quality' => '60',
  'default_phone_region' => 'AT',
  'data-fingerprint' => 'xxx',
);

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

also nothing useful