I have a Django FastCGI setup with 5 processes, backed by Postgres, and I am seeing a problem with stale session data between the processes. This is using the latest SVN checkout (r6369 at the moment), though I've been seeing this for a while now. What happens is that I will set a session value in one process, and when that value is read out of another process, it is using an older, stale value.
2007-09-17 07:00:48,406 577 DEBUG CAPTCHA setting session with [MWOSYF] 2007-09-17 07:00:54,889 577 DEBUG read CAPTCHA from session [MWOSYF] 2007-09-17 07:00:55,151 581 DEBUG CAPTCHA setting session with [ONCLCL] 2007-09-17 07:01:01,313 581 DEBUG read CAPTCHA from session [ONCLCL] 2007-09-17 07:01:01,549 581 DEBUG CAPTCHA setting session with [WDTOZF] 2007-09-17 07:01:07,126 577 DEBUG read CAPTCHA from session [ONCLCL] This is a simple app that is setting a session value using "request.session['captcha'] = captext', and then reading it out equally simply using "captext = request.session['captcha']". As can be seen from the debug output, the first time both the set and read are run from the same PID, about 6 seconds apart, and it works fine. Likewise, the second time both halves are in the same (but new) PID, about 6 seconds apart, and it still works fine. The third time, the set is in one PID and the read in another, again about 6 seconds apart, and the read is getting an old value. Not only is it getting a stale value, but it's getting a stale value from a different PID (as opposed to a stale value which matches the last request in its own PID). So it *is* getting updated session data from the other processes, it just apparently lags behind sometimes, or else fails entirely to recognize that there is new session data available. In my setup, this appears to sometimes work and sometimes not work between PIDs. Rather, it most often works fine, but fails often enough to be annoying. So I guess my questions are 1) Is this expected behavior? i.e. is it expected for session data to lag between processes? 2) If not expected, any thoughts on what would be causing this? Or has anyone else seen similar issues? I checked Trac but did not find anything that looked similar. Thanks... - Keith --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---