PHP children error? Nextcloud web interface much slower after updating to version 21

Initial page loading or changing pressing the settings button or switching from files to dashboard have become very slow.
When it first is in Files menu, its is not slow going through the folders, its only the web interface and not the file system, file system is as before.
It also seem to ping the CPU I use harder (G5400).

I updated to 21 in April.
Its running as a Docker on Unraid 6.9.2 with MariaDB.
Reverse proxy using swag, but it doesnt matter if its locally or remote.

its mainly me that use it daily, tho there are some other that have access to shared folders.

I did not see any erros in the log that can fit with it. (the standard nextcloud log, dont know if it exist a slower one)

Config.PHP:

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => '***************',
  'passwordsalt' => '***************',
  'secret' => '***************',
  'trusted_domains' => 
  array (
    0 => '***************',
    1 => '***************',
  ),
  'dbtype' => 'mysql',
  'version' => '21.0.1.1',
  'trusted_proxies' => 
  array (
    0 => 'swag',
  ),
  'overwrite.cli.url' => '***************',
  'overwritehost' => '***************',
  'overwriteprotocol' => 'https',
  'dbname' => 'NCloud',
  'dbhost' => '***************:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'NCloud',
  'dbpassword' => '***************',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => '***************',
  'mail_domain' => 'gmail.com',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'mail_smtpname' => '***************',
  'mail_smtppassword' => '***************',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'app_install_overwrite' => 
  array (
    0 => 'occweb',
  ),
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'default_phone_region' => 'NO',
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '',
);

Ngnx error log do not have any recent errors.
Do you want the Access log?

PHP errors there is multiple of the same error, but have no idea what they mean or if that is the cause of the slowness:

WARNING: [pool www] server reached pm.max_children setting (5), consider rasing it

Like its maybe 20 of that exact error.

Hi @Mihle

check your /etc/php/7.4/fpm/pool.d/www.conf and increase pm.max_children. Your PHP instance is trying to spawn new processed but is not allowed to.

/S

I can not find that exact location. In the appdata there is no www.conf, there is www2.conf but it just have two lines and nothing else.

If I go the hacky way around to go to the etc folder, aka running krusader docker with etc folder linked to it, there is 3 php folders, php, php-fpm and php-fpm.d. Only the last one has a file that has pm.max_children in it, but in the actual www.conf file it is set to 50, but the one that is www.conf.default its set to 5. should I change it in that one then? both are set to dynamic, whatever that means.

Is there anything else I should check there was it set to that might affect the speed issue?

What is a good number to set it to?

EDIT: in the actual php folder there, there are just really a folder called conf.d that have an libvirt-php.ini file. That only really have a path and a libvirt.max_connections=5, but that is probably something totally different right?

An person on another forum told me to just ad it to www2, and it seems to have worked but I get this warning now:

Is my speed issues linked to that NC 21 seem to use much more CPU than what 20 ever did, and if so, how do I fix it? Every time I switch tabs or go to setting for example, all 4 threads are 90%+ use while its slow for a few seconds.

After some googeling and changing min max spare and start servers, the numbers are only getting larger??

And its only me that access the server and this is only happening when I access next cloud via web, does not happen if I do it via app.

I think I found part of the slowness issue…
For some reason I tried to test in private browsing, there it was fast as it was in NC 20.
So I thought, thats weird, so I deleted cookies related to nextcloud and my site, and changed nothing.
Then I tried disabeling one and one browser plugin, and it got fixed.
You know what plugin caused it? Dark Reader. A plugin that is only supposed to make sites darker.

Why would it cause that?

EDIT: the PHP error still happens but site is much faster again.

1 Like

To make sites darker, it alters the styles by changing the actual css in your browser. If there is many hidden ellements and a lot of JSS and/or CSS files, it takes a long time to process (the plugin).

This topic is old now but, no other sites are not affected the same way of those I use.
I think its little better now than it was btw, but its still slow with the plugin off but its fine disabling for Nextcloud specifically because it has its own dark mode. But its something I have to remember to do if I for whatever reason isnt anymore.