[Zope] ZEO and Sessions.

Fernando Lujan flujan at uol.com.br
Tue Apr 12 18:23:47 EDT 2005


Chris McDonough wrote:

>Yes.
>
>All the information in that article is geared for Zope 2.5 which had no
>facility for using mounted databases from a config file... everything up
>until "At this time you should be able to navigate to the
>/session_storage folder..." in that article can be done by reconfiguring
>ZEO using zeo.conf to serve a new storage, changing your ZEO clients'
>zope.conf files to recognize the new storage and adding a "ZODB Mount
>Point" from within the ZMI from one of the appservers.  The rest of it
>is pretty simple. ;-)
>  
>

Please, take a look in what I've done! Is that right? It works pretty 
fine here! :-)

If this is right, are there a desire for a how-to? I think I can write 
one, once it's pretty simple as you said.

zope.conf

<zodb_db main>
  mount-point /temp_folder
  container-class Products.TemporaryFolder.TemporaryContainer
  # ZODB cache, in number of objects
  cache-size 5000
  <zeoclient>
    server localhost:8100
   storage 1
    name zeostorage
    var $INSTANCE/var
    # ZEO client cache, in bytes
    cache-size 20MB
    # Uncomment to have a persistent disk cache
    #client zeo1
  </zeoclient>
</zodb_db>
<zodb_db temporary>
  mount-point /
  # ZODB cache, in number of objects
  cache-size 5000
  <zeoclient>
    server localhost:8100
   storage 2
    name zeotemporary
    var $INSTANCE/var
    # ZEO client cache, in bytes
    cache-size 20MB
    # Uncomment to have a persistent disk cache
    #client zeo1
  </zeoclient>
</zodb_db>



zeo.conf

# ZEO configuration file

%define INSTANCE /home/flujan/tmp/zeo

<zeo>
  address 8100
  read-only false
  invalidation-queue-size 100
  # monitor-address PORT
  # transaction-timeout SECONDS
</zeo>

<filestorage 1>
  path $INSTANCE/var/Data.fs
</filestorage>

<filestorage 2>
  path $INSTANCE/var/SessionData.fs
</filestorage>

<eventlog>
  level info
  <logfile>
    path $INSTANCE/log/zeo.log
  </logfile>
</eventlog>

<runner>
  program $INSTANCE/bin/runzeo
  socket-name $INSTANCE/etc/zeo.zdsock
  daemon true
  forever false
  backoff-limit 10
  exit-codes 0, 2
  directory $INSTANCE
  default-to-interactive true
  # user zope
  python /usr/bin/python2.3
  zdrun /usr/local/zope-2.7.5/lib/python/zdaemon/zdrun.py

  # This logfile should match the one in the zeo.conf file.
  # It is used by zdctl's logtail command, zdrun/zdctl doesn't write it.
  logfile $INSTANCE/log/zeo.log
</runner>



More information about the Zope mailing list