[Django]-Django Session Not Working on Heroku

4👍

What sort of SESSION_ENGINE are you using in your settings.py? On Heroku, Dynos restart all the time, and should be treated as ephemeral resources.

To combat this, you should probably use SESSION_ENGINE= 'django.contrib.sessions.backends.cached_db'. This will ensure your session data gets persisted to your database on Heroku (you are using Heroku Postgres, right?)

Leave a comment