memcached cache backend creating new connection for every action
|Reported by:||dlowe||Owned by:||nobody|
|Component:||Core (Cache system)||Version:||1.3-beta|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
r15005 introduced a problem for MemcachedCache caches: every call to any cache method which accesses the cache (add, get, set, delete, get_many, incr, decr, set_many, delete_many, clear and even close!) opens a brand-new connection to memcached via the self._lib.Client(...) call now hidden in self._cache. I think this is a major problem for busy sites who are aggressively caching: our site was brought down when we upgraded to 1.3_beta_1, as it very quickly exceeded the memcached concurrency limit.
I've attached a patch including a minimal test case.
I ran the tests against django trunk r15560, with python_memcached-1.44-py2.6.egg and python 2.6.5.
Change History (5)
Changed 4 years ago by dlowe
comment:1 Changed 4 years ago by russellm
- Keywords blocker regression added
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Ready for checkin