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

Fails silently if unable to connect to socket #131

Closed
racitup opened this issue Oct 28, 2017 · 2 comments
Closed

Fails silently if unable to connect to socket #131

racitup opened this issue Oct 28, 2017 · 2 comments

Comments

@racitup
Copy link

racitup commented Oct 28, 2017

There is no indication that a socket is unreachable.

In my case the socket was owned by 'memcache:memcache' with permission 'srwx------' (the default for memcached) yet my client process was run by another user. There appears to be no indication at all that the service was unreachable. I couldn't for the life of my figure out why things weren't being cached from django.. I'm fairly new to this sort of thing.

@dropwhile
Copy link
Contributor

Yes, python-memcached has a "fail silently" design (historical choice, that way for a long time as I recall), so that the loss of a memcache server doesn't bring your infrastructure down completely. Though, presumably, it will make it run more slowly!

There are other client libraries which will raise an error on connection failure if that is desired.

@racitup
Copy link
Author

racitup commented Jan 26, 2018

Sorry I don't see how this binding would "bring your infrastructure down completely" simply by logging a useful error message. I fixed it by using pylibmc. Thanks for the response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants