You're nearly there! 1. Change the mount point to be something like /session_folder 2. Mount the data fs and create the mount point 3. Create a new transient object container in /session_folder 4. Change /session_data_manager to point to /session_folder/your_new_transient_object_container Restart your zope servers and they should all start to use the same shared session back end. -John --- Unix & Web Infrastructure Management Faculty of Medical Sciences Computing University of Newcastle Email : j.p.snowdon@ncl.ac.uk Web: http://www.ncl.ac.uk/medev
-----Original Message----- From: zope-bounces@zope.org [mailto:zope-bounces@zope.org] On Behalf Of Sours, Kevin Sent: 10 March 2008 21:55 To: zope@zope.org Subject: [Zope] Centralized sessions with ZEO
I apologize if this has been asked ad nauseam. I've uncovered enough information online to suggest that it has, but too little to get any kind of definitive answer. My problem is that I am running a number of zope instances against a zeo instance. I would like to store the session data in the ZEO instance so that the session data is shared between the different zope instances. The question is how best to do it.
What I've settled on is the approach given at http://www.zopelabs.com/cookbook/1061234337. This appears to work fine, however I don't really like the idea of using an undoable store and having to constantly pack it. I definitely don't need persistent data (if the sessions go away when I restart ZEO so be it). I tried the same approach using a tempstorage instead of filestorage. This works up until ZEO is stopped and started, at which point the transient object container in the temporary storage disappears (which makes sense, but is a little inconvenient).
I also tried the approach at http://longsleep.org/1/howto/sharesessionwithzeo. This is absolutely perfect for what I want to do save for the fact that it doesn't work. No matter what I tried with it, the sessions don't get shared. In fact, it doesn't look like the database on ZEO get recognized at all. When I go to add a mount point it tells me that there is something in the way of /temp_folder (presumably the autocreated temporary folder object for the default sessions). What I find particularly odd is that this appears to be the case for anything configured to mount at /temp_folder - including the temporary storage configured as part of the default zope.conf file. Changing that part of the default config or removing it entirely doesn't appear to have any impact on how zope runs.
I feel like I'm missing something. It seems like configuring the sessions to use tempstorage on the ZEO instance shouldn't be this hard. I'm also confused by the seemingly spurious block in the zope.conf:
<zodb_db temporary> # Temporary storage database (for sessions) <temporarystorage> name temporary storage for sessioning </temporarystorage> mount-point /temp_folder container-class Products.TemporaryFolder.TemporaryContainer </zodb_db>
I haven't been able to find much documentation on what the various options for this block mean (particularly the container-class) member.
I should probably mention that I am running 2.8.7, which I realize is more than a little out of date at this point. I'm hoping that somebody can fill me in a little or point me to some documentation I may have missed.
Thanks in advance Kevin
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )