-
Notifications
You must be signed in to change notification settings - Fork 201
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
python-memcached return wrong value after crash?? #166
Comments
I ran into the same problem, and it's a problem with python-memcached. I made a python script based on your ipython commands that recreates the bug on most runs.
The output should look like this:
It looks like the problem arises when there are 2 or more processes that uses the same Memcache client object, and one of them crashes while setting a value into the cache. I fixed it by making sure each process initiates it's own Memcached object and made a lookup based on the process id.
This should output the more expected
Just note that this solution uses more sockets for the memcache, as it creates one for each process |
Yes, the problem arises when there are more processes that uses the same Memcache client object. I switched to pymemcache library. It has not the same problem. |
I'm getting the following issue on trying to run this command on IPython. I see python-memcached return wrong value after crash.
Environment
Test scenario:
Run IPython and enter the following commands
I see that after crash python-memcached still keep connection to Memcached but function get() set() have something wrong.
Has anyone run into the same problem? Is this a bug of python-memcached?
The text was updated successfully, but these errors were encountered: