- 🇪🇪Estonia hkirsman
I'm not really sure if this works or not but one way seems to be to call isPersistent() method on the Memcached() object.
I thought why not have it on the /admin/reports/memcache next to connections:
Is it ok that the "Connections 6 open of 1 104 total" is still growing? On our dev server 1104 is 16 000.
- 🇩🇪Germany jan kellermann
Patch #17 works for me. Fine!
Maybe you can choose $settings['memcache']['key_prefix']; as $settings['memcache']['persistent'] per default? In shared environment it could be great to have a pconnection for each drupal. Maybe this could be a hint in the README.
Thank you for your work.
- 🇫🇷France fgm Paris, France
You have to be aware of the fact that the design hypotheses of libmemcached (on which the memcached extension is built) are not entirely compatible with PHP, and as a consequence, the behavior of any code using the memcached extension with persistent connections is often unexpected in the presence of server errors, which can lead to the feeling that bugs exist in memcached servers / libmemcached / the memcached extension / this module, while the underlying issue is in fact a hardly documented design choice regarding expectations of behaviour in the face of errors.
I do not have the link at hand, but IIRC there were already a couple of tickets around these issues. The summary being: avoid using the memcached extension and stick with the memcache extension, which is tailor-made for the PHP design choices and behaves as you would expect in the face of errors.
Also, since the memcache extension has been working quite nicely with PHP 8 since 2020 and version 8 of the extension, and features are almost never critical anyway, downgrading from critical to normal
Posting the static patch because using the MR doesn't allow pinning to a specific commit, so anyone can submit pretty much anything and inject it into our codebase IIRC. This also fixed our issue.