You're right, SessionDynamicStore breaks in this case. It clearly needs some thread locking, but it's a pretty complicated class so it's not immediately clear exactly where the locking needs to go.
I'd stick with File or Memory stores for now. I'll try to look into this problem sometime, but probably not soon. At 01:22 PM 12/7/01 -0500, Daniel Popowich wrote: >Has anyone else seen this problem? After a login screen which sets >the session I launch a multi-frame web-app with each frame loading a >servlet which will get the previously set session (from the login) >with a call to self.session(). When the frameset is loaded the first >time, or when I do a refresh, one of the frames (servlets) >intermittently throws an exception: > > Traceback (most recent call last): > File "WebKit/Application.py", line 343, in dispatchRequest > File "WebKit/Application.py", line 426, in isSessionIdProblematic > File "WebKit/HTTPRequest.py", line 222, in session > File "WebKit/Transaction.py", line 56, in session > File "WebKit/Application.py", line 794, in createSessionForTransaction > File "WebKit/Application.py", line 630, in session > File "WebKit/SessionDynamicStore.py", line 61, in __getitem__ > File "WebKit/SessionDynamicStore.py", line 93, in MovetoMemory > File "WebKit/SessionFileStore.py", line 61, in __delitem__ > KeyError: 2001120712260737320 > >This appears to be a concurrency problem. The code in >SessionDynamicStore appears to assume that requests for sessions >come synchronously. This is OK in a non-frameset world, but with >multiple frames each asking for the same session, the following code >in SessionDynamicStore blows up: > > def MovetoMemory(self, key): > global debug > if debug: print ">> Moving %s to Memory" % key > self._memoryStore[key] = self._fileStore[key] > del self._fileStore[key] > >It's the last line in the method: two threads enter this method, one >deletes the file, the other gets a KeyError because the file doesn't >exist. > >I have confirmed this by turning on debugging for that module. Also, >changing my SessionStore to 'File' makes the exception go away. > >Daniel Popowich >Wordbox, Inc. > > >_______________________________________________ >Webware-discuss mailing list >[EMAIL PROTECTED] >https://lists.sourceforge.net/lists/listinfo/webware-discuss -- - Geoff Talvola [EMAIL PROTECTED] _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
