mounica patnana
mounica patnana

Reputation: 1

Flask Sessions are expiring before set expiration time

My flask sessions are expiring before the set expiration time i.e in my case 24 hours. I have gone through flask documentation and enable permanent session life time and session permanent parameters but these dont seem to work. My application is hosted on AWS with nginx as reverse proxy server and gunicorn as my backend server.

app.config['SECRET_KEY'] = os.getenv('SECRET_KEY')
app.config['SESSION_TYPE'] = os.getenv('SESSION_TYPE')
app.config['SESSION_PERMANENT'] = True
app.config['PERMANENT_SESSION_LIFETIME'] = timedelta(hours=24)

cookie set to 24 hours and i can check it from application tab on browser but upon certain time of inactivity / closing of browser it asks to login not refresh. Indicatinng google id set in session dict is disappearing.

I have exhausted my ways in trying to fix this. Any implementations on how fix and debug above issue is highly appreciated.

Upvotes: 0

Views: 33

Answers (0)

Related Questions