Opened 17 years ago

Closed 16 years ago

Last modified 16 years ago

#3701 closed (duplicate)

Memcached backend is not thread-safe

Reported by: samuel@… 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 samuel@…, 17 years ago

I should mention for posterity that the memcache.py version I'm referring to is 1.34 (currently the latest I believe).

comment:2 by Simon G. <dev@…>, 17 years ago

Triage Stage: UnreviewedAccepted

comment:3 by anonymous, 17 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 mcroydon, 16 years ago

Resolution: invalid
Status: newclosed

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 mcroydon, 16 years ago

Resolution: invalid
Status: closedreopened

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:6 by mcroydon, 16 years ago

Resolution: duplicate
Status: reopenedclosed

Dupe of #5133.

comment:7 by mcroydon, 16 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.

Note: See TracTickets for help on using tickets.
Back to Top