Questions tagged [django-redis]
105 questions
8
votes
3 answers
Django channel Error "took too long to shut down and was killed."
I am getting this error on my console log, and on form submit it keeps loading does not post data to the server.
/home/Python/Working/Benutzerverwaltung/env/lib/python3.6/site-packages/channels/sessions.py:183>
wait_for=

Manoj Datt
- 358
- 1
- 3
- 10
8
votes
2 answers
Can't connect to redis using django-redis
I've got a django project using django-redis 3.8.0 to connect to an aws instance of redis. However, I receive ConnectionError: Error 111 connecting to None:6379. Connection refused. when trying to connect. If I ssh into my ec2 and use redis-py from…

taman
- 237
- 2
- 9
7
votes
1 answer
Django Channels Redis: Exception inside application: Lock is not acquired
Fully loaded multi-tenant Django application with 1000's of WebSockets using Daphne/Channels, running fine for a few months and suddenly tenants all calling it the support line the application running slow or outright hanging. Narrowed it down to…

LiteWait
- 584
- 4
- 21
- 42
7
votes
0 answers
How to use hset with django-redis-cache?
I am new in django/redis and i'm starting to familiarize with heroku redis addon. However, i can only use set and get.
When i'm trying to use other methods like hset , i get this error : 'RedisCache' object has no attribute
cache.hset('key',…

John doe
- 3,680
- 7
- 31
- 65
7
votes
1 answer
Cache values not appearing in Redis
I've got Redis set up as my cache in django, with the following setting:
CACHES = {
'default': {
'BACKEND': 'redis_cache.RedisCache',
'LOCATION': 'localhost:6379',
'OPTIONS': {
'PICKLE_VERSION': 1,
},
…

mlissner
- 17,359
- 18
- 106
- 169
6
votes
2 answers
Django Rest Framework: Pickle Response
What I'm trying to do is build a custom version of cache_page where I have more control over the cache key, but I'm getting stuck with even the basic caching of my response:
from django.core.cache import cache
from rest_framework import…

Darkstarone
- 4,590
- 8
- 37
- 74
6
votes
1 answer
Django redis LPUSH / RPUSH
I am using the django-redis backend and the django.core.cache.cache module.
The django cache module does not seem to support proper functionality of pushing to lists and manipulating certain data structures.
The implied implementation used to…

Robert Christopher
- 461
- 1
- 6
- 15
5
votes
2 answers
Removing sessions from Redis (Django)
I'm using Django and Redis as session engine (also Celery, but that is something else). It works perfectly and I can see an improvement in speed.
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
I have a script that runs every minute…

Bob Dem
- 991
- 1
- 11
- 23
4
votes
2 answers
how to combine values from Redis and Django-rest-framework
I'm building a social app which has a "like" feature, I'm using django-redis to store "like" numbers from every post like this:
from django_redis import get_redis_connection
con = get_redis_connection("default")
con.incr("post" + ":" + id)
From the…

Windsooon
- 6,864
- 4
- 31
- 50
3
votes
0 answers
Django Channels AsyncWebSocketConsumer ConnectionClosedError 1005
I am writing a django channels application and noticed an exception when handling a heartbeat function related to websocket status code which I haven't been able to find any existing issues for. This is in an AsyncWebsocketConsumer backed by…

BillPull
- 6,853
- 15
- 60
- 99
3
votes
1 answer
redis-sentinel connection error in django with "AUTH called without any password configured for the default user. Are you sure ..."
I have a problem with the redis-sentinel connection.
I tried to connect redis-sentinel by using django-redis.
# redis connection factory
DJANGO_REDIS_CONNECTION_FACTORY = 'django_redis.pool.SentinelConnectionFactory'
# These sentinels are shared…

Kim Juyeon
- 31
- 4
3
votes
1 answer
Is it okay to use the same Redis store for both cache and django-channels channel layer in Django?
I have a Django 3.1 app that uses Redis for its cache backing store (django-redis). I wish to use django-channels, which has the ability to use Redis for channel layers.
Is it safe or unsafe to use the same Redis store for both the cache and the…

sunw
- 535
- 5
- 29
3
votes
1 answer
How to store and read common data in redis from python and rust?
I have some data being stored in redis cache which will be read by my application in Rust. The data is being stored by python. Whenever I am storing a string or an array, it stores it in a weird form which I was not able to read into Rust. Vice…

Rishav Banka
- 77
- 8
3
votes
1 answer
Python 2.7 and 3.7.2 compatible django-redis serializer
I'm trying to write a py2.7 - py3.7 compatible django-redis serializer.
I'm using django-redis==4.8.0 with django==1.11.22 and the PickleSerializer. I saw this issue https://github.com/niwinz/django-redis/pull/279 on django-redis and wrote a…

jarussi
- 1,491
- 1
- 13
- 25
3
votes
1 answer
Why django redis cache cannot get the data in redis
My cache settings:
CACHES = {
'default': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': 'redis://127.0.0.1:6379/1',
'OPTIONS': {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
},
…

QiuYu
- 85
- 1
- 6