[Zope] ZEO, Persistent Sessions

Travis Miller travis at ctln.org
Mon Aug 2 15:44:43 EDT 2004


hi,

my zeo setup is running like a top :-) ...until!

i would like my zeo clients to share the same session storage.

out of the box, zope has a temporary storage database (/temp_folder) 
for the session data (/temp_folder/session_data). the session data 
manager (/session_data_manager) is then configured to pull from the 
session data (/temp_folder/session_data).

my first inclination was to create another session data object 
(/session_folder/session_data) in the main database and to configure 
the session data manager to pull from it. (i've also tried using a 
separate zeo filestorage and mounting it. as expected, i saw the same 
results through out.)

however, when i do this, it seems as though only one zeo client is 
allowed to use the session. a simple python script that prints 
request.SESSION succeeds on one client, but fails with a key error on 
the other.


Traceback (innermost last):
   Module ZPublisher.Publish, line 101, in publish
   Module ZPublisher.mapply, line 88, in mapply
   Module ZPublisher.Publish, line 39, in call_object
   Module Shared.DC.Scripts.Bindings, line 306, in __call__
   Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
   Module Products.PythonScripts.PythonScript, line 323, in _exec
   Module None, line 7, in test-session
    - <PythonScript at /Portals/test-session>
    - Line 7
   Module ZPublisher.HTTPRequest, line 1218, in __getattr__
   Module ZPublisher.HTTPRequest, line 1178, in get
   Module Products.Sessions.SessionDataManager, line 94, in 
getSessionData
   Module Products.Sessions.SessionDataManager, line 181, in 
_getSessionDataObject
   Module Products.Transience.Transience, line 768, in new_or_existing
   Module Products.Transience.Transience, line 439, in __setitem__
KeyError: 1091449200


i have:
   python 2.3.4
   Zope 2.7.1
..compiled from source


this was all i could really find on zeo clients sharing sessions. it 
seems to support what i have attempted:
   http://www.zopelabs.com/cookbook/1061234337


what might i be missing?
if sharing the session is a bad idea. where else could i store session 
like information for a script based application?


thanks for any help


thanks,
travis



More information about the Zope mailing list