I have a Django app deployed on Google App Engine that prematurely logs its users out. But no browser window/ tab is closed. In settings.py, I have this code:
SESSION_COOKIE_AGE = 365 * 24 * 60 * 60
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
I also tried using this code right after calling auth.login():
request.session.set_expiry(30*24*60*60)
Is there any way that I can let the length of the auth.login session be much longer, say, a year?
If you’re using cache-based session back-end it is possible that the session data get’s removed from the cache, which for user will look like he/she has been logged out. Memcache can/will delete data in some cases, i.e to make room for your new data.
To narrow down the problem i recommend: