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
We've recently encountered instability issues with a redis instance in our infrastructure. This generated many user unwanted disconnections but no errors were tracked server side. The problem was that we had TimeoutError when querying redis and that those errors were silently ignored by redis_sessions.
There are two methods of SessionStore which ignores the errors:
If connection to redis timed out, django thinks the session is deleted and removes the session cookie during response. So the client is logged off although it might reload or reconnect some seconds later.
We've recently encountered instability issues with a redis instance in our infrastructure. This generated many user unwanted disconnections but no errors were tracked server side. The problem was that we had
TimeoutError
when querying redis and that those errors were silently ignored byredis_sessions
.There are two methods of SessionStore which ignores the errors:
SessionStore.load
SessionStore.delete
It looks a bad design to me for two reasons:
I suggest to remove those try/except as
StrictRedis.get
used inSessionStore.load
andStrictRedis.delete
inSessionStore.delete
does not raise exceptions if the key does not existdecode
method already handle exceptions in case of corrupted dataWhat do you think?
The text was updated successfully, but these errors were encountered: