session issue with django+apache+mod_wsgi

三世轮回 提交于 2019-12-04 20:28:38

There are a couple of different options for this.

In order of likelyhood (imho):

  • The session backend uses the cache system to store the sessions and you're using the locmem cache backend
  • The session backend isn't storing the cookies (secure cookies enabled? cookie timeouts? incorrect date on the server?)
  • The session middleware might not be loaded (custom settings for production server?)

Storing the session in the cache is only a good solution if you use memcached as the cache backend. So if you're storing the sessions in cache, make sure you use memcache :)

Either way, check if SESSION_ENGINE is set to django.contrib.sessions.backends.db

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!