You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DB shouldn't go into OPTIONS, it should be appeneded to the unix socket url: unix:///var/run/redis/redis-server.sock?db=3
Because django-environ doesn't report an error, this can have a very dangerous consequences: you can use redis cache for months only to discover that it always used the default first db instead. Potentially this can lead to data loss.
The text was updated successfully, but these errors were encountered:
@thomasf As far as I remember the problem is not in quoting. Problem is somewhere either in django-environ or django-redis. One of the packages or both do not properly handle specifying db when using Unix socketsfor cache. This is probably why the problem went unnoticed - it's very hard to notice that your cache values are stored in a different redis db unless you run several instances of the same app on a single server (my case).
I've tried to find and fix the problem but after wasting three hours just reverted back to using TCP sockets.
Cache connection string
CACHE_URL="rediscache:///var/run/redis/redis-server.sock?db=3&client_class=django_redis.client.DefaultClient"
is incorrectly parsed as:
DB
shouldn't go intoOPTIONS
, it should be appeneded to the unix socket url:unix:///var/run/redis/redis-server.sock?db=3
Because django-environ doesn't report an error, this can have a very dangerous consequences: you can use redis cache for months only to discover that it always used the default first db instead. Potentially this can lead to data loss.
The text was updated successfully, but these errors were encountered: