Session Variables are not retained in python flask

52 views
Skip to first unread message

Lakshmi Vairamani

unread,
Mar 8, 2021, 5:37:28 PM3/8/21
to Dialogflow CX Edition users
We have a Google Assistant based (google assistant + dialogflow) chatbot with python API for fulfillment. 

Local Setup:
In local machine with Python Flask API + ngork setup, we didn't face any issues with session variables.

Server Setup:
In Hostinger VPS (Ubuntu), we deployed the same code with Flask API + gunicorn + nginx. We observed that the session variables are getting reset very frequently.

Session Management:
We added the following code in Python for sessions to stay longer.
    app.permanent_session_lifetime = timedelta(minutes=10)

Would appreciate any help in sorting out this issue.
Reply all
Reply to author
Forward
0 new messages