Random session timeouts when setting request.set_expiry(0)
|Reported by:||danjac||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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.