#3701 closed (duplicate)
Memcached backend is not thread-safe
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Cache system) | Version: | dev |
Severity: | Keywords: | memcached | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Django relies on the cache backend to be thread-safe, and a single instance of a memcache.Client is not thread-safe. The issue is with Django only creating a single instance that is shared between all threads (django.core.cache.cache).
Also discussed here: http://groups.google.com/group/django-developers/browse_thread/thread/c7566757bae3f139
Change History (7)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 18 years ago
A new version of the python memcache module exists that fixes this issue; however, this ticket may still be valid for other cache backends (I haven't tried them).
http://lists.danga.com/pipermail/memcached/2007-June/004482.html
comment:4 by , 17 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
According to the previous comment, this has been fixed since python-memcached 1.36 and the current release is up to 1.40. Reopen if it's still an issue in newer versions.
comment:5 by , 17 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Still investigating if this is still an issue. Marking this as a dupe of #5133, which has a patch but may not be the best way to go about it.
comment:7 by , 17 years ago
As mentioned in the resolution of #5133, it looks like this has been fixed in python-memcached 1.4.0. Please try with 1.4.0 or the latest version available, that should solve your problem.
I should mention for posterity that the memcache.py version I'm referring to is 1.34 (currently the latest I believe).