Needs work
Project:
Memcache API and Integration
Version:
8.x-2.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
7 Jan 2018 at 03:17 UTC
Updated:
8 Mar 2023 at 00:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
lcatlett commentedThe attached patch updates the README with :
- How to configure memcache settings without requiring the module to be installed first
- Using memcache as a backend for non default bins for core ~8.2.x
- Updated per-bin settings
- Installing Drupal using memcache as an alternative backend
- Updated information on chained fast backend bin defaults and per-bin configuration
- Additional troubleshooting information
These updates will likely help close several open issues reported as module bugs with the provided settings updates and troubleshooting information.
Comment #3
anavarreDisclaimer: I haven't tested the suggested recommendations in
settings.php- This is more a review to make the patch ready-to-go otherwise.s/configure memcache/configure it
Extra space at EOL.
Extra space at EOL.
Extra space at EOL. Also should be wrapped at 80 cols.
Should be wrapped at 80 cols.
Extra space at EOL. Also, this paragraph could be reworked such as we use as much of the 80 cols limit as possible.
Should be wrapped at 80 cols.
Extra space at EOL.
Extra space at EOL.
Extra space at EOL + line should be wrapped at 80 cols.
Should be wrapped at 80 cols.
Extra space at EOL.
Should be wrapped at 80 cols. Since "Insert the following to settings.php" is to introduce an example to add to settings.php, it could also be a new line.
Also, "Insert the following in settings.php", maybe?
Extra space at EOL.
s/rather than database/rather than the database
Likely redundant with the 'PROBLEM' string above. Perhaps we should rename PROBLEM in ERROR directly.
More text could fit in here, until we get to 80 cols.
Extra space at EOL.
Extra space at EOL.
Extra space at EOL.
Extra space at EOL.
You could use the space on this line until you get to 80 cols.
Extra space at EOL.
Comment #4
lcatlett commentedUpdated patch is attached addressing the issues in #3
Comment #5
anavarreAn interdiff is helpful here.
Comment #6
volkswagenchickI am tagging this fldc18 so I can use this issue as an example in a session for Florida Drupal Camp this weekend. Thanks!
Comment #7
volkswagenchickI used simplytest.me to review patch, it applies clean.
Some minor nitpicks to do with extra spaces.
extra space at the end on line 170
extra space at the end of line 197
extra line at the end of line 256
extra space at the end of line 297
Comment #8
janusman commentedFrom https://www.drupal.org/files/issues/update-readme-2934916-4.patch ...
These 2 sections in the patched README have newlines for readability, but that causes the actual code (if pasted as-is) to silently fail (e.g., $memcache_module_is_present would always be false) because of the newlines at the end of line 273 and 287 of the patch.
Comment #9
timodwhit commentedNice work with the changes. Here are a few grammatical suggestions.
"Arbitrarily" doesn't seem to fit here. Since there is most likely a strategy as mentioned in a later section. Maybe we reference that section
double that
poiting -> pointing
I don't think the "Since" is needed here. But it might be good to provide more context on what moving these bins could help with.
Comment #10
webchickTagging as a D8 stable release blocker, per #2989594: [META] Create a stable release of Memcache module for Drupal 8.
Comment #11
mpotter commentedThe problem I have with the entire method of dealing with memcache in settings.php is that the README instructions basically tells you to autoload memcache even if you have the module disabled.
For one, this currently breaks Rules module.
But I totally need to have a single deploy step for enabling Memcache. Seems like a simpler approach of loading the core.extensions.yml to see if memcache module is enabled would be less complicated.
But yes, the current README instructions for memcache don't work and the patch fixes it (with the side effect of breaking Rules and who knows what else). But at least it doesn't cause the error when memcache module is disabled.
Comment #12
mpotter commentedFor the Rules issue it seems the patch in #2816033: Rules registers no listeners on rare occasions. #33 might fix this. So maybe it's a Rules issue and not a Memcache issue. Although doing the autoloader in settings.php regardless of if memcache module is enabled still seems nasty.
But given that webchick just marked this as a D8 stable blocker I guess I withdraw my complaint for now. Maybe someday we'll have a cleaner way of handling this.
Comment #13
webchickWell, the stable blocker is specifically "make sure the README is up to date and gets you a working install," so if we need to document different things to avoid these kinds of errors, that can be part of it.
Comment #14
misc commentedI have been trying for almost one and a half years to be co-maintainer of this module to help out. No luck yet.
Comment #15
wturrell commentedFirstly, thanks to lcatlett and others for doing this; the info on memcache modules in blogposts etc. is inconsistent.
I think it'd help to mention memcache_admin somewhere, given it has to be manually enabled and I discovered it by accident.
Also, if anyone can help me set it up with Docker (Docker for Mac is rather slow; it feels like memcached might help) perhaps we should have a few lines about that. #2996656: Configuring for Lando/Docker
Comment #16
anavarreIt'd be great to move forward with updating the README file before tagging the GA. This would help with testing the RC and seeing if anything breaks.
Comment #17
idebr commentedClosed #2908413: Minor mistake of bullet numbering in README.txt as a duplicate issue, since these changes are included in the latest patch in this issue. Please credit @yas and @Disha.addweb for their work in the related issue.
Comment #18
heddnpatch no longer applies.
Comment #19
muldos commentedHi,
I've just setup memcached on my project.
Reading this patch was helpful, but I think recent code changes require to update the bootstrap container definition if we want it to use memcached.
Here is what has worked for me :
This is because now MemcacheBackend takes only 4 arguments in its constructor ( http://cgit.drupalcode.org/memcache/tree/src/MemcacheBackend.php?h=8.x-2.x)
Another change I've spotted is stampede & lock configuration.
To have it working properly, I've take example on http://cgit.drupalcode.org/memcache/tree/example.services.yml?h=8.x-2.x
with memcache-lock.services.yml
Comment #20
jonathanshawThe readme is very confusing as it is now, especially to the non-expert in Memcache.
It's hard to know what is the basic recommended approach, and what are advanced esoterica one can happily ignore if one doesn't know what they are.
I suggest something like the following approach:
Requirements: Memcache vs memcached (you need 1, but the module will auto-detect for you, method of configuration is different)
Basic installation steps (assume module in installed first)
Recommended settings (what 80% of people will be happy having in their settings.php)
Advanced cache considerations (why/when/what might be varied from the recommendation)
Settings for multiple sites
Settings for multiple servers
Advanced installation procedures (if module not installed first)
Other advanced configuration
Comment #21
keansmith commentedPHP Memcache does not work for PHP 7.
http://php.net/manual/en/book.memcache.php
Comment #22
o'briatPHP memcache PECL support PHP 7 since 4.x (2019) en PHP8 since 8.0 (2020).
This issue is totally outdated. Is the readme still need to be updated ?
Comment #23
o'briatThe LOCKS part is a bit messy :
$settings['bootstrap_container_definition']seems to overlap :memcache.timestamp.invalidator.tagis duplicated.cache_tags.invalidator.checksumandlockcould be moved from services file to this array, no ? Maybe all the example.services.yml content could be moved here ?Comment #25
o'briatI just stumble on a memcached failover presentation on PHP doc :https://www.php.net/manual/fr/memcached.addservers.php#118940
IMHO the failover should be more documented in the README: the advantages of this solution (perf and resiliency), what happen when a server is added or missing, ...