martinrusev / django-redis-sessions

Session backend for Django that stores sessions in a Redis database
BSD 3-Clause "New" or "Revised" License
494 stars 106 forks source link

Can not clearing expired sessions. #61

Open hoaithing opened 5 years ago

hoaithing commented 5 years ago

I relize that when i logout old session key still remaining.

Then I get some problem when try to clear session by execute command:

python manage.py clearsessions

then get : Session engine 'redis_sessions.session' doesn't support clearing expired sessions.

I have a lot of remaining session in redis DB. so it's usually out of Memory on my server.

I am using version django-redis-sessions-0.4.0.

Thanks for help.

e911 commented 5 years ago

I got the same problem too. Did you find any solutions to this?

Eerovil commented 4 years ago

Since redis itself supports key expiration, clearsessions shouldn't be needed. Can you check the expiration dates for your very old sessions?