[Zope] MappingStorage for ZEO Sessions?

Chris McDonough chrism at plope.com
Wed May 5 22:04:22 EDT 2004


On Tue, 2004-05-04 at 18:09, george donnelly wrote:
> hi
> 
> I have a 4 client ZEO cluster that I am setting up a central sessions
> storage for. I'm wondering if someone can give me a little feedback on
> what I have done, eg i have a few questions:
> 
> 1. am i doing this right?
> 
> 2. where does the mapping storage store itself on the filesystem? as
> part of the Data.fs of the root-mounted filestorage?

A MappingStorage stores its data in RAM.

> 3.  If i add a transient object container a level below the zope root,
> will its data also get stored in the Mapping Storage?

If you point the session data manager at a transient object container
that resides in a mount point backed by a MappingStorage (or a
ClientStorage that is backed by a MappingStorage on the ZEO side), its
data will be stored there.

> 
> I am using MappingStorage and it is setup in zeo.conf like this:
> 
> <mappingstorage sess>
>   name mapping storage for sessions
> </mappingstorage>
> 
> in zope.conf I have the temporary storage setup like this:
> 
> <zodb_db temporary>
>     <zeoclient>
>      server 192.168.1.4:8424
>      storage sess
>      name temporary mapping storage for sessioning
>    </zeoclient>
>     mount-point /temp_folder
>     container-class Products.TemporaryFolder.TemporaryContainer
> </zodb_db>

Looks right.

> 
> in zeo.log I get this:
> 
> 2004-05-04T14:21:51 INFO(0) RUNSVR opening storage 'sess' using
> MappingStorage
> ------
> 2004-05-04T14:21:51 INFO(0) ZSS:7175 StorageServer created RW with
> storages: 1:RW:/path/to/zeohome/var/Data.fs, sess:RW:mapping storage for
> sessions
> 
> and later this:
> 
> 
> 2004-05-04T14:46:13 INFO(0) zrpc-conn:192.168.1.4:60202 zeoLoad() raised
> exception: '\x00\x00\x00\x00\x00\x00\x00\x00'
> Traceback (most recent call last):
>   File "/usr/local/zope/270/lib/python/ZEO/zrpc/connection.py", line
> 264, in handle_request
>     ret = meth(*args)
>   File "/usr/local/zope/270/lib/python/ZEO/StorageServer.py", line 248,
> in zeoLoad
>     p, s = self.storage.load(oid, '')
>   File "/usr/local/zope/270/lib/python/ZODB/MappingStorage.py", line 56,
> in load
>     p = self._index[oid]
> KeyError: '\x00\x00\x00\x00\x00\x00\x00\x00'

I think this is a "normal" error when a database is first created.

> 
> the client connects fine, under Control Panel > Databases > temporary I
> see:
> 
> Database Location 
> temporary mapping storage for sessioning (connected) 
> 
> Database Size 
> 239.0K 
> 
> also there are many writes and few loads.

Seems like it's working... at least something is getting stored in it...
not sure if that's sessions or not, but at least the infrastructure
looks right.

- C





More information about the Zope mailing list