Clarification: Is APCu acceptable for memcache.locking
?
#43895
Labels
0. Needs triage
Pending check for reproducibility or if it fits our roadmap
29-feedback
bug
feature: caching
Related to our caching system: scssCacher, jsCombiner...
feature: filesystem
pending documentation
This pull request needs an associated documentation update
Is APCu acceptable for usage for transactional file locking under any circumstances we consider "supported"? If it's acceptable, are there caveats?
Background: Last year @linuxserver set a default value of for
memcache.locking
that utilizes APCu in their Nextcloud image: linuxserver/docker-nextcloud@aaa5539 via linuxserver/docker-nextcloud#317.This was apparently in response to the performance warning added in v27 (when the database is being used for locking - i.e. when Redis isn't configured): linuxserver/docker-nextcloud#319
The end result is that all LinuxServer image users are now using APCu for transactional file locking rather than the database (unless the admin has explicitly configured Redis). This achieved their goal: no longer a warning about using the database for locking.
But is this a valid configuration?
Our documentation is not 100% clear whether we support the use of APCu for
memcache.locking
:We have fallback code that appears to prefer a
NULL_CACHE
(over using APCu as a fallback) for locking:server/lib/private/Memcache/Factory.php
Lines 101 to 103 in f2f1074
My understanding is that APCu can maybe work for mod_php and some PHP-FPM operating modes. The key requirement being that the operating mode in-use must permit all processes to use a shared APCu cache. However, even if the application server layer is fine, anything happening at the command-line will not use the same APCu cache (effectively being blind to Transaction File Locking). This could lead to problems in areas like
occ files
commands (and possibly others) I'd think.So is APCu acceptable at all? Is it worse - or better - than a NULL_CACHE?
TODO:
memcache.locking
even if specified explicitly in the config?The text was updated successfully, but these errors were encountered: