Opened 16 years ago
Closed 16 years ago
#8155 closed (worksforme)
Random session timeouts when setting request.set_expiry(0)
Reported by: | danjac | Owned by: | nobody |
---|---|---|---|
Component: | contrib.sessions | Version: | dev |
Severity: | Keywords: | session, timeouts | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Latest Django trunk ((0, 97, 'pre')), Debian latest stable, Apache2, MySQL, Python 2.5.
We have been experiencing random logouts (session timeouts) on our web application (http://moblog.net). Users experience on average several logouts every day.
This seems to be down to two reasons:
- Calling request.session.set_expiry(0), i.e. to end the session when the user's browser is closed. Setting this to a set time in seconds seemed to solve this issue, but it appears that using this setting can somehow interfere with session timeouts.
- KeepAlive? "off" or a low KeepAliveTimeout? (1-5 seconds). We would like to reduce KeepAliveTimeout? in order to improve server performance, unfortunately this again seems to have caused the random session timeout problem to reappear.
Note:
See TracTickets
for help on using tickets.
I've not seen this happen, personally. A couple things to double-check:
I suspect that this isn't a Django bug: the fact that modifying Apache's conf changes the behvior strongly points to a web server and/or proxy configuration problem. Changing these parameters in theory shouldn't affect Django at all.
Because of that I'm going to close this ticket. However, please feel free to reopen (preferably with more information, if you've got it) after investigating further -- I'm not completely confident ruling out a bug in Django here.