documentation
documentation copied to clipboard
(server tuning) Clarify opcache settings impact on occ maintenace:mode
β¦and config.php
Clarify impact of messing with opcache.revalidate_freqand/or disabling revaliation completely (i.e. opcache.validate_timestamps = 0).
βοΈ Resolves
- Fix nextcloud/server#37557
- Fix nextcloud/server#38872
πΌοΈ Screenshots
I would probably phrase it differently, doing less changes but mostly add "and some occ commands like occ:maintenance:mode" after "config.php". But I am no native speaker and the change is factually correct. So I'll leave approval up to someone else, regarding whether it is good and understandable English π.
In any case, we want this in older NC version docs as well.
/backport to stable27
/backport to stable26
Thanks for your pull request :+1:
We try to invalidate the cache when changing the configuration file.^1
Afaik opcache is different for cli/web and therefor maintenance:mode --off will not invalidate the cache for web requests. I guess we need a web controller to trigger a cache clear from cli for opcache web.
opcache.validate_timestamps = 0
I expect to run into the same issue (no changes without php-fpm restart) for
occ app:install, oc app:update, occ app:remove, occ system:config:set and any other occ command altering php files.
Afaik opcache is different for cli/web and therefor
maintenance:mode --offwill not invalidate the cache for web requests.
Exactly, different PHP process (even different executable) means own OPcache. CLI should not have any OPcache at all, unless it has been manually explicitly enabled in PHP configs (not recommended). There is no way of accessing another PHP instance's OPcache, reasonably.
I guess we need a web controller to trigger a cache clear from cli for opcache web.
That would be great. But it needs to be somehow secured, of course no open web API. Some sort of flag in database or on filesystem wouldn't make sense either: If a flag needed to be checked on every web access/action, it would break the little performance benefit of disabling OPcache validation. So either there is a secure way to directly trigger it, or it better remains a documented limitation when disabling OPcache validation.
Another related issue (not sure why I didn't link this originally): #9184