Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing optional indices - Memchache\APCu probleem #395

Open
Tracked by #394
sgort opened this issue Feb 7, 2025 · 2 comments
Open
Tracked by #394

Missing optional indices - Memchache\APCu probleem #395

sgort opened this issue Feb 7, 2025 · 2 comments

Comments

@sgort
Copy link

sgort commented Feb 7, 2025

Probleemschets

Ik doe een poging om de ontbrekende indexen aan te maken, maar struikel over een error waar ik niet uit kom.

Volgens de docs is het commando $ sudo -u www-data php occ db:add-missing-indices

Als ik dat echter probeer met de goede user en php{versie} dan gaat het mis.

root@PlexNAS:/volume2/web/nextcloud# sudo -u http php82 occ db:add-missing-indices
An unhandled exception has been thrown:
OCP\HintException: [0]: Memcache OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)

Mijn config.php deelde ik al, maar hier nogmaals met de toegevoegde 'memcache.local' => '\OC\Memcache\APCu', onderaan.

root@PlexNAS:/volume2/web/nextcloud/config# cat config.php 
<?php
$CONFIG = array (
  'instanceid' => 'ocom0ebbg8zw',
  'passwordsalt' => '....',
  'secret' => '....',
  'trusted_domains' => 
  array (
    0 => 'nextcloud.open-regels.nl',
  ),
  'datadirectory' => '/volume2/ncdata/data',
  'dbtype' => 'mysql',
  'version' => '30.0.5.1',
  'overwrite.cli.url' => 'https://nextcloud.local',
  'dbname' => 'Nextcloud',
  'dbhost' => 'localhost:/run/mysqld/mysqld10.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '....',
  'installed' => true,
  'default_phone_region' => 'NL',
  'memcache.local' => '\OC\Memcache\APCu',
  'maintenance_window_start' => 1,
);

In de gewijzigde configuratie parameters van het bijbehorende PHP profiel is apc.enable_cli = 1 aanwezig.

Image

Hulpvraag

Ik realiseer mij dat dit geen Open Catalogi issue is per se, maar dunkt me dat het helpt als we dat wel met elkaar weten te fixen. Een best practice PHP profiel met configuratie voor meerdere platformen lijkt me gewenst.

@sgort sgort changed the title Missing optional indices, want daarvoor lijkt de oplossing onderweg. Missing optional indices - Memchache\APCu probleem Feb 7, 2025
@sgort
Copy link
Author

sgort commented Feb 7, 2025

Krijg nou wat?!

Ik doe een allerlaatste poging en zie daar...

root@PlexNAS:/volume2/web/nextcloud# sudo -u http php82 --define apc.enable_cli=1 occ db:add-missing-indices
The current PHP memory limit is below the recommended value of 512MB.
Adding additional systag_by_objectid index to the oc_systemtag_object_mapping table, this can take some time...
oc_systemtag_object_mapping table updated successfully.

En idd, de melding op Security & setup warnings overview is gone.

Dan zijn de vragen:

  • how come wel werkend als onderdeel cli, maar niet als config parameter in profiel hierboven gedeeld?
  • en hoe/waar pas ik PHP memory aan? Want als dat de memory_limit parameter is in hetzelfde rijtje als apc.enable_cli dan gaat er daar iets niet goed blijkbaar.

@sgort
Copy link
Author

sgort commented Feb 8, 2025

Ok. Gevonden. In php.ini van onderstaande dir heb ik de memory_limit parameter aangepast.

root@PlexNAS:/usr/local/etc/php82/cli# ls -l
total 20
drwxr-xr-x 2 root root  4096 Feb  7 22:14 conf.d
-rw-r--r-- 1 root root 13234 Feb  7 20:52 php.ini
(...)
max_multipart_body_parts = -1
memory_limit = 512M
output_buffering = 4096
(...)

Commando opnieuw en deze keer geen memory limit waarschuwing.

root@PlexNAS:/volume2/web/nextcloud# sudo -u http php82 --define apc.enable_cli=1 occ db:add-missing-indices
root@PlexNAS:/volume2/web/nextcloud# 

Conclusie

Er is blijkbaar verschil tussen memory_limit parameter voor cli en/of Apache service?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant