After upgrading Nextcloud to 28, I see a bunch of errors in its admin overview and cannot load logs

My YunoHost server

Hardware: Old laptop or computer (actually a new one)
YunoHost version: 11.2.10 (stable)
I have access to my server : Through SSH | through the webadmin | direct access via keyboard / screen | … (all of it)
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If yes, please explain:
If your request is related to an app, specify its name and version: 28.0.2~ynh1

Description of my issue

If I go to /settings/admin/overview on my Nextcloud install, I get the following warning, which was not there before I upgraded to 28:

There are some warnings regarding your setup.

  • 15 errors in the logs since February 9, 2024

  • Server has no maintenance window start time configured. This means resource intensive daily background jobs will also be executed during your main usage time. We recommend to set it to a time of low usage, so users are less impacted by the load caused from these heavy tasks. For more details see the documentation :arrow_upper_right:.

  • The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running “occ db:add-missing-indices” those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster. Missing optional index “mail_messages_msgid_idx” in table “mail_messages”.

  • The PHP OPcache module is not properly configured. The OPcache interned strings buffer is nearly full. To assure that repeating strings can be effectively cached, it is recommended to apply “opcache.interned_strings_buffer” to your PHP configuration with a value higher than “32”… For more details see the documentation :arrow_upper_right:.

  • Integrity checker has been disabled. Integrity cannot be verified.

Please double check the installation guides :arrow_upper_right:, and check for any errors or warnings in the log.

Check the security of your Nextcloud over our security scan :arrow_upper_right:.

I wonder whether I should a) do this myself manually following Nextcloud documentation, or b) is there a way to do it through YuNoHost.

If a), then it would be nice if YuNoHost had a post-install notice that it is likely the admin needs to do that by themselves.

If b), how do I trigger that and it would be nice if the upgrade process already included that automatically.

In addition and odder still, when I go to /settings/admin/logging I get an error saying it cannot load the log entries.

1 Like

I have got similar issues with 28 (not all but)
So you can

  • add on the file /var/www/netxcloud/config/config.php this line
    'maintenance_window_start' => 1,
  • For the occ tables just do this
cd /var/www/nextcloud
sudo -u nextcloud php8.2 --define apc.enable_cli=1 occ db:add-missing-indices
  • For this message, I have edit the file /etc/php/8.2/fpm/php.ini and uncomment this line ;opcache.interned_strings_buffer=8 and choose 32 like this
opcache.interned_strings_buffer=32

and then restart the service

yunohost service restart php8.2-fpm

But perhaps you need be sure there no too much critical apps using also a php8.2-fpm, look here before to see which app used it

ls /etc/php/8.2/fpm/pool.d/
2 Likes

Thanks, @rodinux , that solved it.

But I am still wondering whether The Right Way To Do It™ is to do it manually (as you suggested) or have YuNoHost do that during an update.

1 Like

well after a few days (weeks ?) I still have errors on opcache, now i see this

sudo -u nextcloud php8.2 --define apc.enable_cli=1 occ setupchecks
[...]
		✓ Limite de mémoire PHP: ?
		✗ opcache PHP: Le module PHP OPcache n'est pas correctement configuré. OPcache ne fonctionne pas comme prévu, opcache_get_status() retourne faux, veuillez vérifier la configuration.
Le nombre maximum de clés OPcache est presque dépassé. Pour vous assurer que tous les scripts puissent être conservés en cache, il est recommandé de définir la variable « opcache.max_accelerated_files » de votre fichier de configuration PHP à une valeur supérieure à « 10000 ».
Le tampon mémoire OPcache est presque plein. Pour vous assurer que tous les scripts peuvent être conservés en cache, il est recommandé de définir la variable « opcache.memory_consumption » de votre fichier de configuration PHP à une valeur supérieure à « 128 ».
Le tampon mémoire des chaînes internes OPcache est presque plein. Pour vous assurer que les chaînes répétitives peuvent être mise en cache, il est recommandé de définir la variable « opcache.interned_strings_buffer » de votre fichier de configuration PHP à une valeur supérieure à « 8 »..
		✓ l'option "output_buffering" de PHP: Désactivé
[...]
1 Like

Thank you @hook and @rodinux, I had nearly the same issues (and a whole bunch of other stuff before I even got this far).

In fact the steps above helped in getting rid of the warnings in the webadmin-interface of Nextcloud! Great stuff, I’m amazed and thankful! But on running the setupchecks command I get the same error message. I tried experimenting around with the php.ini config file, but couldn’t find anything that worked in getting this error message away.

I thought I’d include the error here in English too, so we might have a better chance at someone smart having an idea on how to possibly fix it?

sudo -u nextcloud php8.2 --define apc.enable_cli=1 occ setupchecks

[...]
  php:
    ✓ PHP default charset: UTF-8
    ✓ Freetype: Supported
    ✓ PHP getenv
    ✓ PHP memory limit: ?
    ✗ PHP opcache: The PHP OPcache module is not properly configured. OPcache is not working as it should, opcache_get_status() returns false, please check configuration.
      The maximum number of OPcache keys is nearly exceeded. To assure that all scripts can be kept in the cache, it is recommended to apply "opcache.max_accelerated_files" to your PHP configuration with a value higher than "10000".
      The OPcache buffer is nearly full. To assure that all scripts can be hold in cache, it is recommended to apply "opcache.memory_consumption" to your PHP configuration with a value higher than "128".
      The OPcache interned strings buffer is nearly full. To assure that repeating strings can be effectively cached, it is recommended to apply "opcache.interned_strings_buffer" to your PHP configuration with a value higher than "8"..
    ✓ PHP "output_buffering" option: Disabled
    ✓ PHP Imagick module

[...]

PS: In my php.ini, I did all the adjustments as requested in these error messages (except for opcache.interned_strings_buffer which I set to 32 as the web-interface originally requested), and deleted the semicolons at the beginning of the lines where I put the values.

I always executed yunohost service restart php8.2-fpm after the adjustments, but maybe there is something else I should have needed to do to reload the configuration? Could it be an issue that there are 3 more different php-versions installed?

Best wishes and a lovely evening!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.