Merge pull request #9 from stefantalpalaru/redis-limits

Documents Redis default key eviction policy issue.
This commit is contained in:
Bertrand Bordage 2015-02-16 20:05:37 +01:00
commit 37ea9eb801

View file

@ -10,6 +10,19 @@ Locmem is a just a dict stored in a single Python process.
Its not shared between processes, so dont use locmem with django-cachalot
in a multi-processes project, if you use RQ or Celery for instance.
Redis
.....
By default, Redis will not evict persistent keys (those without an expiry set)
when the maximum memory has been reached. The keys created by django-cachalot
are persistent, so in an out of memory situation most of the site will go down
due to OOM exceptions.
To avoid this, you can change 'maxmemory-policy' to 'allkeys-lru' in redis.conf.
Be aware that this policy applies to all the databases on that server.
You'll also want to keep an eye on the redis stats and increase 'maxmemory' if
needed. This is just to improve performance, it doesn't impact site availability.
MySQL
.....