5

I have been using Django for my application for quite some time now. I have had a problem that users get logged out suddenly.

Users enter information using an admin model to enter information in a text area(using Django MarkitUp), when they click save they are redirected to the login page.

My session expiry is set to 2 weeks(1209600) and the users have logged in the same day before entering information in the textarea.

m b
  • 101
  • 8
  • There are so many variables here, and you're not providing any information as to what you did. Did it start after you began using MarkitUp? Is it only submitting data via this text area that results in users being logged out? Do they routinely perform other actions without problem? Is it only after periods of inactivity? Have you rebooted your web-server? Is it occurring in all browsers? – Rejected Apr 28 '14 at 16:47
  • I get the issue even when I'm viewing an html file (django template) which is wrapped with a @login_required decorator in its view . So it may not be due to MarkitUp or a form submission. I had inactivity for hardly 5 minutes when I refreshed the page and it took me to the login page. I have not rebooted my web server. Yes, it is occurring in all browsers – m b Apr 28 '14 at 19:54
  • Does your system have enought free RAM/SWAP? – Juanmi Taboada Apr 28 '14 at 21:23
  • Possibly a client-side issue too. Too many variables could be causing the issue (as Rejected mentions). It would make sense to try figuring out what is causing the issue through a trial-and-error method and testing all the likely reasons that might be causing the problem first. – Joe Apr 28 '14 at 21:36
  • Juan: Yes, my system has a lot of free RAM @Joe: Could you give me some examples of what I could look into. I have looked into the obvious reasons like web server reboot and session information – m b Apr 29 '14 at 00:59
  • Perhaps we should create a chat wiki to help you solve this then. I'm not sure how, so if you can figure it out and create a chat session for this question, we can discuss a variety of possible issues that are causing the login state to not hold (my guess is that it's possibly cookies or session-state). – Joe Apr 30 '14 at 01:53
  • 1
    If you are using cache-based sessions the issue can be related to restarting of your memcache server. – Dmytriy Voloshyn Apr 30 '14 at 20:59

1 Answers1

0

Are you sure your redirect URL matches your sessions-related settings?

Michael Samoylov
  • 2,933
  • 3
  • 25
  • 33