[Zope] Session Variables Redux
Dennis Allison
allison at shasta.stanford.edu
Wed Feb 8 14:16:07 EST 2006
Zope 2.9.0
Python 2.4.2
There appears to still be a problem with session variables that does not
appear to be the result of interactions with conflicts nor the result of
unexpected restarts. It does not appear to be load related.
The problem we see is a sudden disappearance of all, one, or a small
number of session variables. In a session varaiable stateful system this
is an embarassment. The behavior is a bit like a variable which is
not identified as persistent, but all read and write accesses go through
a getSessionVariable/setSessionVariable interface:
## Script (Python) "getSessionVariable"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=varname
##title=
##
request=container.REQUEST
session=request['SESSION']
return session[varname]
## Script (Python) "setSessionVariable"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=var, val
##title=
##
request = container.REQUEST
session=request['SESSION']
# write only if necessary
if not session.has_key(var) or session[var]!=val:
session[var]=val
Our session lifetimes are long (hours, days) and conflicts are fairly
frequent. Hand checking of the logs does not show any obvious correlation
between session variable loss and conflict. Moreover, all conflicts are
"resolved".
Does anyone else see this sort of problem? Any suggestions as to how to
isolate the problem?
More information about the Zope
mailing list