[Zope-dev] Sessions and long requests = conflicts? Mcdutils?

Maciej Wisniowski maciej.wisniowski at coig.katowice.pl
Wed Apr 11 14:28:21 EDT 2007


Hi

Currently I have some problems with our application (Zope2.8.4)
and with Conflict Errors in sessions.
In general if we have few concurrent requests that are running
sometimes for 3-4 minutes (and they're touching session inside)
I get a lot of conflict errors with Inceraser, OOBTree, Length2 etc.
These are errors like:

serial starded with xxx serial currently commited xxxx

Of course I know that it is best to move such long processes to
something external with Async, lovely.Remotetask or built
in Oracle jobs, but so far I have to deal with this state of
our application (as I'm not the author ot this but rather
something like an zope admin/supporter for this app).

I think that ConflictErrors are caused because of sessions
implementation, especially: timeslices, "current" bucket etc.
as written in Transience/HowTransienceWorks.stx.
Changing session_resolution_seconds to big value
helps here. By default we had session_resolution_seconds
set to 300.

I wonder how this happens. If I have two requests that at the beginning
modify it's sessions like: session.set('aa', 1), and then call long
running ZSQLMethods then (if meanwhile timeslice has changed because
of too short session_resolution_seconds):

- first request that finishes finds that there is new 'current' bucket
  and moves it's session object and second request's session object to
  new 'current' bucket and commits this

- second request finishes and finds that it's session object is not
  the same as it was at the beginning (because it was moved to 'current'
  bucket)??


Anybody can say if I'm right here?


I also tried Faster product to manage sessions but this behaves in a
similiar way (I mean causes conflict errors in such situation).

I found 'mcdutils' too. Tres Seaver said on zope-dev (a long time ago)
that it is supposed to have no conflict errors:
http://mail.zope.org/pipermail/zope-dev/2006-May/027555.html

Mcdutils:
http://agendaless.com/Members/tseaver/software/mcdutils

There is only 0.1 version. What is it's current state? Seems to
be dead? Can I take a look at this or is this better to not
even touch that?

-- 
Maciej Wisniowski




More information about the Zope-Dev mailing list