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

Document how to enable memcached #103

Open
NicolasGoeddel opened this issue Apr 29, 2020 · 9 comments
Open

Document how to enable memcached #103

NicolasGoeddel opened this issue Apr 29, 2020 · 9 comments

Comments

@NicolasGoeddel
Copy link

Hi,

I do not understand how to activate the caching feature. I checked the checkbox at "Cache LDAP queries" and tried to set localhost as the "Memcached Server to use". I also installed memcached on our Ubuntu machine using apt install memcached. systemctl status memcached tells me that the service is running. What am I missing?

Unfortunately there is no documentation about the "How to enable memcached". It is only mentioned that it can be used.

The property field "Memcached Server to use" always has the value feature not available which does not help me either. How can I make that feature available? Do I need an extra python package to install? Or an extra extension for Plone?

I am running Plone 5.2.1 with Python 3.6.8.

This issue is also about updating the documentation about caching to help other users. Thank you.

@jensens
Copy link
Member

jensens commented Apr 29, 2020

Add one of the following memcached python client libs to your instances eggs section in your buildout:

I think this need to be added to the README.

@jensens jensens changed the title How to enable memcached? Document how how to enable memcached Apr 29, 2020
@NicolasGoeddel
Copy link
Author

Thank you. Which one do you prefer?

@jensens
Copy link
Member

jensens commented Apr 30, 2020

I prefer pylibmc. it is slightly faster, but needs the c-library installed in the system.

@NicolasGoeddel
Copy link
Author

I installed pylibmc using buildout and I can import it successfully and store values in it from the command line when I connect manually to the memcached server. However the ldap control panel still shows "feature not available" and I also can not override that field. What am I doing wrong?

This was my test:

>>> import pylibmc
>>> mc = pylibmc.Client(["127.0.0.1"], binary = True, behaviors={'tcp_nodelay' : True, 'ketama' : True})
>>> mc['hi']
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/user/plone/buildout-cache/eggs/pylibmc-1.6.1-py3.6-linux-x86_64.egg/pylibmc/client.py", line 160, in __getitem__
    raise KeyError(key)
KeyError: 'hi'
>>> mc['hi'] = 'hello'
>>> mc['hi']
'hello'

I also tried an other invalid ip address as a counterexample and I got the right error:

pylibmc.Error: error 31 from memcached_set: (0x28a8610) A TIMEOUT OCCURRED, (number_of == 0),  host: 192.0.0.1:11211 -> libmemcached/connect.cc:133

@NicolasGoeddel
Copy link
Author

Sorry for pushing this but I really could need a bit help as soon as possible. Thanks!

@NicolasGoeddel
Copy link
Author

It seems that it works without issues on the production machine but not on our development machine. I will investigate that.

@ldaverio
Copy link

I installed pylibmc using buildout and I can import it successfully and store values in it from the command line when I connect manually to the memcached server. However the ldap control panel still shows "feature not available" and I also can not override that field. What am I doing wrong?

It seems to me that it's related to issue #34, I stumbled on the same problem for a couple of days before seeing the light. If you have deinstalled + reinstalled pas.plugins.ldap, you must apply the indicated workaround from the ZMI.

@ldaverio
Copy link

It seems that it works without issues on the production machine but not on our development machine. I will investigate that.

I would suppose you had deinstalled and reinstalled the module at some point on your development machine, but not on your production machine. Cf. my previous reply.

@om1221
Copy link

om1221 commented Aug 19, 2024

Add one of the following memcached python client libs to your instances eggs section in your buildout:

I think this need to be added to the README.

I was able to find AD users with only installed memcached, but after install libmc, I can no longer find any AD users. What additional settings are required?

@gforcada gforcada changed the title Document how how to enable memcached Document how to enable memcached Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants