[Zope] Re: Catalog query time

Chris McDonough chrism at plope.com
Fri Mar 19 12:53:04 EST 2004


On Fri, 2004-03-19 at 07:46, Kevin Carlson wrote:
> Chris McDonough wrote:
> > On Fri, 2004-03-19 at 02:02, Kevin Carlson wrote:
> >   
> > > Chris McDonough wrote:
> > > 
> > > I guess that I don't understand why sessioning is causing this issue.  
> > >     
> > Neither do I, but I haven't really seen the code you're using, so it's
> > not really possible to deduce what's happening.
> > 
> >   
> The code that I am using only checks values of variables held in the
> session.  I need field level access control for some of the forms that
> I am displaying so I pass around a field level access code along with
> some other user information in the session.  I have a bit of code in
> each of these forms (written in DTML) that checks the session
> variables and then displays only the items that they are allowed to
> see.  The code never alters the information in the session, it is a
> read only operation.

FWIW, sessions are inherently not read-only because when they are
accessed, even only to read, they do write to the database to expire old
sessions.  But I did read your other mail where you disabled everything
and it still happens so I am stumped.

But if you are getting the exact same traceback you reported before,
*something* is using sessions or at least Transience, upon which
sessions are based.  Were I you, and I didn't want to dig into what
exactly is causing the sessioning machinery to be invoked, I might try a
bit of voodoo by replacing the temporary storage that backs the
sessioning database  with a filestorage by replacing the <zodb_db
temporary> stanza in your zope.conf with:

<zodb_db temporary>
    # Temporary storage database (for sessions)
    <filestorage>
      path $INSTANCE/var/Sessions.fs
    </filestorage>
    mount-point /temp_folder
    container-class Products.TemporaryFolder.TemporaryContainer
</zodb_db>

This will use a FileStorage to back the sessioning database instead of a
TemporaryStorage.  This database file will grow and grow and grow,
unlike a TemporaryStorage, which does garbage collection of unused nodes
and stores its data in RAM.  You will need to pack the sessioning
database every so often.  One other thing about this is that you will be
able to see the Sessions.fs file grow and that will tell you whether
things are using sessioning or not.

I'm not sure what else to suggest at the moment other than stepping
through all of the code in the code path invoked when you render the
page to figure out where sessions are invoked to disable them.

- C







More information about the Zope mailing list