Re: [Zope] Zope 2.8 and conflict errors

2005-08-08 Thread Stefan H. Holek

Well, you know...

In this one project, we had an interesting (cough) situation with  
PostgreSQL + psycopg, where we would see plenty of write conflict  
errors coming from the DB connector.


Turned out PostgreSQL has kind of an optimistic transaction  
control, where the DB server returns something like couldn't really  
resolve this concurrency issue, please retry to the DB connector,  
and psycopg would translate that into a ZODB ConflictError to make  
the ZPublisher retry the transaction. Not kidding.


So, while I don't know much about the internals of DCOracle you may  
want to make sure the ConflictErrors are due to the ZODB at all.


Stefan


On 7. Aug 2005, at 23:50, Tim Peters wrote:





If you want to dig deeper, look into what happens inside
   lib/python/ZODB/ConflictResolution.py





I'll try to check this, thanks for the hint. :)



It's the only way you'll figure it out ;-)


--
Anything that happens, happens.  --Douglas Adams


___
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 )


Re: [Zope] Zope 2.8 and conflict errors

2005-08-07 Thread Dieter Maurer
Maciej Wisniowski wrote at 2005-8-5 23:37 +0200:
 Do you see a reason why your requests modify Procedure instances?
 I find this strange: I would expect that they are rarely modified
 (just once to set them up).
It's possibly because of _connect method in DCOracle2 SP.py. It 
assigns to self _v_proc, connection, and errors count.

Assignments to _v_ attributes (they are so called volatile
attributes) do not change the persistent state and cannot cause
conflicts.

There must be some other modification to the procedure objects.

-- 
Dieter
___
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 )


Re: [Zope] Zope 2.8 and conflict errors

2005-08-07 Thread Tim Peters
[Maciej Wisniowski, wrestling with  _p_resolveConflict]
 Because of errors like:

 ConflictError: database conflict error (oid 0x0299de, class
 Products.DCOracle2.DA.Procedure, serial this txn started with
  0x035f0726c7bfca88 2005-08-01 08:38:46.816215, serial currently
 committed 0x035f072fed78ebee 2005-08-01 08:47:55.657582)
 
 and according to:
 http://www.upfrontsystems.co.za/Members/jean/conflicterrors-explained
 I've added:
 
 def _p_resolveConflict(self, old, saved, new):
print 'old:', old
print 'saved:', saved
print 'new:', new
return new
 
 to SP.py into procedure class (DA.Procedure extends this),
 
 I've started Zope with runzope and there are no 'old':?, 'new':?,
 'saved:?' statements at all on the console although other print
 statements from SP.Procedure are visible.

 Maybe these conflict errors I'm dealing with are different kind and
 are not falling into the correct piece of code or maybe this kind
 of test (print 'something') is too stupid to see if _p_resolveConflict
 is executed?

Offhand it looks OK to me, but I don't have any of the code you're
using.  If you want to dig deeper, look into what happens inside

lib/python/ZODB/ConflictResolution.py

in function tryToResolveConflict().  If your _p_resolveConflict() were
getting called, you would see the print output you coded.  Therefore
it's not getting called.  tryToResolveConflict() is what _tries_ to
call it (assuming that for an instance `object` of this type,
getattr(object, _p_resolveConflict, None) returns a non-None value
to begin with, which I can't tell for sure from what you've said).
___
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 )


Re: [Zope] Zope 2.8 and conflict errors

2005-08-07 Thread Maciej Wisniowski



Assignments to _v_ attributes (they are so called volatile
attributes) do not change the persistent state and cannot cause
conflicts.

There must be some other modification to the procedure objects.

 


I should have written:

It's possibly because of _connect method in DCOracle2 SP.py.
It assigns values to self._v_proc, self.connection
and self.errors. So except '_v_proc' there are 'connection' 
and 'errors' variables that are being assigned to. 
Maybe this it's because of them.


--
Maciej Wisniowski


___
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 )


Re: [Zope] Zope 2.8 and conflict errors

2005-08-07 Thread Maciej Wisniowski



Offhand it looks OK to me, but I don't have any of the code you're
using.  


I think that it's not my code problem but rather something with
DCOracle2 and to reproduce this error it is enough to call
any 'DCOracle2 StoredProcedure' object simultaneously
by a lot of users (50 is enough for my Zope (ZEO) to cause these
errors).


If you want to dig deeper, look into what happens inside
   lib/python/ZODB/ConflictResolution.py


I'll try to check this, thanks for the hint. :)

--
Maciej Wisniowski
___
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 )


Re: [Zope] Zope 2.8 and conflict errors

2005-08-07 Thread Tim Peters
[Tim Peters]
 Offhand it looks OK to me, but I don't have any of the code you're
 using.

[Maciej Wisniowski]
 I think that it's not my code problem but rather something with
 DCOracle2 and to reproduce this error it is enough to call
 any 'DCOracle2 StoredProcedure' object simultaneously
 by a lot of users (50 is enough for my Zope (ZEO) to cause these
 errors).

Sorry, I'm not making myself clear:  I don't have _any_ of the code
you're using, including DCOracle2.  I don't use it -- and I don't have
time to try to figure out how to use it.  But I know the code paths in
ZODB on the way toward calling _p_resolveConflict, and if I did have
the code you were using, this is what I'd do:

 If you want to dig deeper, look into what happens inside
lib/python/ZODB/ConflictResolution.py
 
 I'll try to check this, thanks for the hint. :)

It's the only way you'll figure it out ;-)
___
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 )


Re: [Zope] Zope 2.8 and conflict errors

2005-08-06 Thread Maciej Wisniowski

 Not correct. _p_resolveConflict is used in Zope 2.8.x (and in Zope 3)


exactly the same way it was used in 2.7.x.  If it's not working, there
may be a new bug in 2.8.x, but there's been report of that yet.


Because of errors like:

ConflictError: database conflict error (oid 0x0299de, class
Products.DCOracle2.DA.Procedure, serial this txn started with
0x035f0726c7bfca88 2005-08-01 08:38:46.816215, serial currently
committed 0x035f072fed78ebee 2005-08-01 08:47:55.657582)

and according to:
http://www.upfrontsystems.co.za/Members/jean/conflicterrors-explained
I've added:

def _p_resolveConflict(self, old, saved, new):
   print 'old:', old
   print 'saved:', saved
   print 'new:', new
   return new

to SP.py into procedure class (DA.Procedure extends this),

I've started Zope with runzope and there are no 'old':?, 'new':?,
'saved:?' statements at all on the console although other print
statements from SP.Procedure are visible.

Maybe these conflict errors I'm dealing with are different kind and
are not falling into the correct piece of code or maybe this kind
of test (print 'something') is too stupid to see if _p_resolveConflict
is executed?

--
Maciej Wisniowski
___
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 )


Re: [Zope] Zope 2.8 and conflict errors

2005-08-05 Thread Maciej Wisniowski
 That looks like a write conflict. MVCC helps to lower/eliminate the  
rate of read conflicts.
 One option to reduce the rate of this write conflict is to tune the  
session machinery to suit.

 For example use session-resolution-seconds  of say 300 seconds.
Thanks!
I've changed session-resolution-seconds and did some tests again.
With DCOracle 2 there are still some errors (30 conflicts visible for users
for 3000 requests), but with SQLRelay there are no errors at all! :)
I didn't checked all 30 errors but I think these are all conflicts 
errors with

Products.DCOracle2.DA.Procedure object like this one:

PAn error was encountered while publishing this resource.
/P
PSTRONGZODB.POSException.ConflictError/STRONG/P
 Sorry, a site error occurred.ppTraceback (innermost last):
ul
li  Module ZPublisher.Publish, line 187, in publish_module_standard/li
li  Module ZPublisher.Publish, line 161, in publish/li
li  Module ZPublisher.Publish, line 161, in publish/li
li  Module ZPublisher.Publish, line 161, in publish/li
li  Module ZPublisher.Publish, line 151, in publish/li
li  Module Zope2.App.startup, line 158, in zpublisher_exception_hook/li
li  Module ZPublisher.Publish, line 119, in publish/li
li  Module Zope2.App.startup, line 215, in commit/li
li  Module transaction._manager, line 84, in commit/li
li  Module transaction._transaction, line 381, in commit/li
li  Module transaction._transaction, line 379, in commit/li
li  Module transaction._transaction, line 427, in _commitResources/li
li  Module ZODB.Connection, line 637, in tpc_vote/li
li  Module ZEO.ClientStorage, line 893, in tpc_vote/li
li  Module ZEO.ClientStorage, line 877, in _check_serials/li
/ulConflictError: database conflict error (oid 0x0299de, class
   Products.DCOracle2.DA.Procedure, serial this txn started
with 0x035f181b76214155 2005-08-04 08:59:27.686696, serial
currently committed 0x035f181b79752811 2005-08-04 08:59:28.466635)

Any ideas what can be done to remove this problem, except the obvious
solution - that is moving to SQLRelay ;) I tried _p_resolveConflict 
function
but without effect - it's used to resolve write conflict and I suppose 
these

errors like the one above are read conflicts.

--
Maciej Wisniowki
___
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 )


Re: [Zope] Zope 2.8 and conflict errors

2005-08-05 Thread Dieter Maurer
Maciej Wisniowski wrote at 2005-8-5 09:23 +0200:
 ...
li  Module ZEO.ClientStorage, line 877, in _check_serials/li
/ulConflictError: database conflict error (oid 0x0299de, class
Products.DCOracle2.DA.Procedure, serial this txn started
with 0x035f181b76214155 2005-08-04 08:59:27.686696, serial
currently committed 0x035f181b79752811 2005-08-04 08:59:28.466635)

Do you see a reason why your requests modify Procedure instances?

I find this strange: I would expect that they are rarely modified
(just once to set them up).

-- 
Dieter
___
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 )


Re: [Zope] Zope 2.8 and conflict errors

2005-08-05 Thread Maciej Wisniowski

Do you see a reason why your requests modify Procedure instances?
I find this strange: I would expect that they are rarely modified
(just once to set them up).
It's possibly because of _connect method in DCOracle2 SP.py. It 
assigns to self _v_proc, connection, and errors count.


Yes, it's a bit strange and possibly unnecessary. I've already 
looked at this but had no time to try doing changes in DCO2 
code - I stared testing other branch of DCO2 from its CVS and 
SQLRelay.


DCOracle2 is far more complicated than SQLRelayDA or
PsycopgDA. I've crated my own OracleStoredProcedure product
for SQLRelay which behaves just like Procedure from DCO2
but has a bit more complicated usage. It's written in
far more simple way and thanks to this more stable 
I think :)



Thanks to pointing this, I'll try to take closer look.
Maybe assigning self._v_proc during initialization will
do the thing... but I'm afraid it's not so simple ;)


One more question - am I correct that _p_resolveConflict 
is not used anymore in Zope 2.8.x?


--
Maciej Wisniowski

___
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 )


Re: [Zope] Zope 2.8 and conflict errors

2005-08-05 Thread Tim Peters
[Maciej Wisniowski]
 ...
 One more question - am I correct that _p_resolveConflict
 is not used anymore in Zope 2.8.x?

Not correct.  _p_resolveConflict is used in Zope 2.8.x (and in Zope 3)
exactly the same way it was used in 2.7.x.  If it's not working, there
may be a new bug in 2.8.x, but there's been report of that yet.
___
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 )


Re: [Zope] Zope 2.8 and conflict errors

2005-08-03 Thread Maciej Wisniowski

It might. ZEO adds network overhead to ZODB transactions,
which generally increases the likelihood of conflict errors.


I've created ZEO and executed the same test 
with my application.


Tests were done with SQLRelay backend (DCOracle2 is 
running now ;))


I have tested this with 50, 55, 60 and 70 users.
with 50 users: no 'HTTP/1.1 500' errors
with 55 users: no 'HTTP/1.1 500' errors
with 60 users: no 'HTTP/1.1 500' 1 error for 1800 urls requested
with 65 users: no 'HTTP/1.1 500' 4 errors for 1950 urls requested

All errors are with OOBTree and as I can see 
with tempstorage.TemporaryStorage. They look like:


li  Module ZPublisher.Publish, line 187, in publish_module_standard/li
li  Module ZPublisher.Publish, line 161, in publish/li
li  Module ZPublisher.Publish, line 161, in publish/li
li  Module ZPublisher.Publish, line 161, in publish/li
li  Module ZPublisher.Publish, line 151, in publish/li
li  Module Zope2.App.startup, line 158, in zpublisher_exception_hook/li
li  Module ZPublisher.Publish, line 119, in publish/li
li  Module Zope2.App.startup, line 215, in commit/li
li  Module transaction._manager, line 84, in commit/li
li  Module transaction._transaction, line 381, in commit/li
li  Module transaction._transaction, line 379, in commit/li
li  Module transaction._transaction, line 424, in _commitResources/li
li  Module ZODB.Connection, line 462, in commit/li
li  Module ZODB.Connection, line 503, in _commit/li
li  Module ZODB.Connection, line 526, in _store_objects/li
li  Module tempstorage.TemporaryStorage, line 200, in store/li
/ulConflictError: 
database conflict error (oid 0x0944, class BTrees._OOBTree.OOBTree, 
serial this txn started with 0x035f134dc11a2977 2005-08-03 12:29:45.258327, serial 
currently committed 0x035f1357051c7199 2005-08-03 12:39:01.197916)



So far I see that DCOracle2 version of my app caused 9 errors for 
the same scenario with 50 users. These are conflict errors with 
DCOracle2.DA.Procedure and in ZEO.ClientStorage...


--
Maciej Wisniowski

___
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 )


Re: [Zope] Zope 2.8 and conflict errors

2005-08-03 Thread Maciej Wisniowski

I've lost context here... is this good or bad? ;-)


 I'm keenly interested in your results, so 
 please let me know.


I've just send my results ;)

Good or bad... it depends. It's much better than 
it was with Zope 2.8.0, it is better than with 
Zope 2.7.2 but it is not perfect because 
errors are still here.


Our application will have about 500 users or more.
Of course they won't be working simultaneously and 
app will be running on much faster machines than 
one used for tests but I suppose that some errors

will appear.

For me these results seems really good. 
Another good thing is that the SQLRelayDA is going 
to be more stable than DCOracle2 and is even faster 
than DCO2. I have almost ready products, scripts and

changes to SQLRelayDA that can convert application
from DCO2 to SQLRelay with one click and we are 
going to resign from DCO2, but still more testing 
is necessary.



Previously you've written that:

Zope 2.8.0 ships with a TemporaryStorage 
implementation (used by sessions in the default
configuration) which does not implement MVCC.  
The one in 2.8.1 (now in beta) and better will

implement MVCC

so I hope that maybe next 
Zope 2.8.x release will be using MVCC for OOBTree 
(if this is the point?). Does anybody know 
something about that?


--
Maciej Wisniowski

___
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 )


Re: [Zope] Zope 2.8 and conflict errors

2005-08-03 Thread Chris McDonough
On Wed, 2005-08-03 at 23:02 +0200, Maciej Wisniowski wrote:
 Previously you've written that:
 
 Zope 2.8.0 ships with a TemporaryStorage 
 implementation (used by sessions in the default
 configuration) which does not implement MVCC.  
 The one in 2.8.1 (now in beta) and better will
 implement MVCC
 
 so I hope that maybe next 
 Zope 2.8.x release will be using MVCC for OOBTree 
 (if this is the point?). Does anybody know 
 something about that?

MVCC only really relates to storages.  Individual database objects don't
participate in MVCC.   If you put your OOBTrees in a storage that
supports MVCC, you get it for free.

- C


___
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 )


Re: [Zope] Zope 2.8 and conflict errors

2005-08-02 Thread Maciej Wisniowski
I'm keenly interested in your results, 
so please let me know.

Hi!

We have just executed two tests of our 
app on Zope 2.8.1b1 and the results are 
good now.


1. Application with SQLRelay backend 
connected to Oracle. Simulation of 50 users.

No internal server errors :)

2. Application with DCOracle2 backend 
connected to Oracle. Simulation of 50 users.

No internal server errors :)

Seems good, but we need more tests. 

Previous installation with Zope 2.8 was 
on ZEO, this one is standalone Zope 2.8.1.

I'm not sure if this matters.

Both DCOracle2 and SQLRelay had some 
changes by me.


BTW. SQLRelay version is a bit faster 
than DCOracle version :)


--
Maciej Wisniowski

___
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 )


Re: [Zope] Zope 2.8 and conflict errors

2005-08-02 Thread Paul Winkler
On Tue, Aug 02, 2005 at 11:28:40AM +0200, Maciej Wisniowski wrote:
 Previous installation with Zope 2.8 was 
 on ZEO, this one is standalone Zope 2.8.1.
 I'm not sure if this matters.

It might. ZEO adds network overhead to ZODB transactions,
which generally increases the likelihood of conflict errors.

-- 

Paul Winkler
http://www.slinkp.com
___
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 )


[Zope] Zope 2.8 and conflict errors

2005-08-01 Thread Maciej Wisniowski

Hi!

Does anybody tried 2.8 and can say something about conflict errors?

I've done few tests and results are not good.

We've checked one of our applications on Zope 2.7.2 and the same
application on Zope 2.8. We have simulated 50-65 users executing the
same path in application. There was total count 1500 pages visited
during test.

With Zope 2.7.2 we've received about 39 internal server errors
HTTP/1.1 500.

Errors in Zope 2.7.2 are mainly ReadConflictErrors with
DCOracle2.DA.Procedure like:

--
2005-08-01T09:54:08 INFO(0) TM:65540 Failed to abort object
Traceback (most recent call last):
 File /opt/Zope/2.7.2/lib/python/ZODB/Transaction.py, line 393, in 
_commit_error

   j.abort(o, self)
 File /opt/Zope/2.7.2/lib/python/ZODB/Connection.py, line 561, in 
setstate

   invalid = self._is_invalidated(obj)
 File /opt/Zope/2.7.2/lib/python/ZODB/Connection.py, line 590, in 
_is_invalidated

   raise ReadConflictError(object=obj)
ReadConflictError: database read conflict error (oid 000299de, 
class Products.DCOracle2.DA.Procedure)

--

Other errors are like Shouldn't load state xxx when
connection is closed but these are known bugs in older ZODB version.


Zope 2.8 supports MVCC so we hoped that the number of
errors decrease but... with Zope 2.8 we get about 129 internal
server errors HTTP/1.1 500 and additionally a lot of 402 errors 
(unauthorized).


Errors 402 are because of internal server errors on login page
(testing application continues test without checking if user has been
properly logged in).

In the event.log there are no conflict errors saved :-/ ,
only unauthorized. We get the error from client responses
and from console.

I don't know what happens. May it be because of using old
data.fs file (from 2.7.2) with Zope 2.8?

Anybody has similiar experiences? Is Zope 2.8 useable??


Below few errors from the console (runzope) and from user browser:


2005-08-01 10:46:22 INFO ZODB conflict error at /crProd/acl_users/login 
(16 conflicts since startup at 2005-08-01T10:45:58)

2005-08-01 10:46:22 BLATHER Conflict traceback
Traceback (most recent call last):
 File /opt/Zope/2.8.0/lib/python/ZPublisher/Publish.py, line 113, in 
publish

   request, bind=1)
 File /opt/Zope/2.8.0/lib/python/ZPublisher/mapply.py, line 88, in mapply
   if debug is not None: return debug(object,args,context)
 File /opt/Zope/2.8.0/lib/python/ZPublisher/Publish.py, line 40, in 
call_object

   result=apply(object,args) # Type scr to step into published object.
 File /opt/Zope/2.8.0/lib/python/Shared/DC/Scripts/Bindings.py, line 
311, in __call__

   return self._bindAndExec(args, kw, None)
 File /opt/Zope/2.8.0/lib/python/Shared/DC/Scripts/Bindings.py, line 
348, in _bindAndExec

   return self._exec(bound_data, args, kw)
 File 
/opt/Zope/2.8.0/lib/python/Products/PythonScripts/PythonScript.py, 
line 323, in _exec

   result = f(*args, **kw)
 File Script (Python), line 3, in login
 File /opt/Zope/2.8.0/lib/python/ZPublisher/HTTPRequest.py, line 
1214, in __getattr__

   v = self.get(key, default, returnTaints=returnTaints)
 File /opt/Zope/2.8.0/lib/python/ZPublisher/HTTPRequest.py, line 
1174, in get

   if callable(v): v = v()
 File 
/opt/Zope/2.8.0/lib/python/Products/Sessions/SessionDataManager.py, 
line 93, in getSessionData

   return self._getSessionDataObject(key)
 File 
/opt/Zope/2.8.0/lib/python/Products/Sessions/SessionDataManager.py, 
line 180, in _getSessionDataObject

   ob = container.new_or_existing(key)
 File /opt/Zope/2.8.0/lib/python/Products/Transience/Transience.py, 
line 844, in new_or_existing

   item = self.get(key, _marker)
 File /opt/Zope/2.8.0/lib/python/Products/Transience/Transience.py, 
line 491, in get

   item = self._move_item(k, current_ts, default)
 File /opt/Zope/2.8.0/lib/python/Products/Transience/Transience.py, 
line 297, in _move_item

   abucket = self._data.get(ts, None) # XXX ReadConflictError hotspot
 File /opt/Zope/2.8.0/lib/python/ZODB/Connection.py, line 704, in 
setstate

   self._setstate(obj)
 File /opt/Zope/2.8.0/lib/python/ZODB/Connection.py, line 757, in 
_setstate

   self._load_before_or_conflict(obj)
 File /opt/Zope/2.8.0/lib/python/ZODB/Connection.py, line 768, in 
_load_before_or_conflict

   raise ReadConflictError(object=obj)
ReadConflictError: database read conflict error (oid 0x0a, class 
BTrees._IOBTree.IOBTree)



error in /crProd/acl_users/login - is with request.SESSION statement.


2005-08-01 10:46:21 BLATHER Conflict traceback
Traceback (most recent call last):
 File /opt/Zope/2.8.0/lib/python/ZPublisher/Publish.py, line 113, in 
publish

   request, bind=1)
 File /opt/Zope/2.8.0/lib/python/ZPublisher/mapply.py, line 88, in mapply
   if debug is not None: return debug(object,args,context)
 File /opt/Zope/2.8.0/lib/python/ZPublisher/Publish.py, line 40, in 

Re: [Zope] Zope 2.8 and conflict errors

2005-08-01 Thread Chris McDonough
Hi Maciej,

I can't speak to the 500 errors you're receiving but Zope 2.8.0 ships
with a TemporaryStorage implementation (used by sessions in the
default configuration) which does not implement MVCC.  The one in 2.8.1
(now in beta) and better will implement MVCC, so you *should* see
performance improve (or at least see fewer conflict errors while using
sessioning).  I'm keenly interested in your results, so please let me
know.

- C


On Mon, 2005-08-01 at 12:21 +0200, Maciej Wisniowski wrote:
 Hi!
 
 Does anybody tried 2.8 and can say something about conflict errors?
 
 I've done few tests and results are not good.
 
 We've checked one of our applications on Zope 2.7.2 and the same
 application on Zope 2.8. We have simulated 50-65 users executing the
 same path in application. There was total count 1500 pages visited
 during test.
 
 With Zope 2.7.2 we've received about 39 internal server errors
 HTTP/1.1 500.
 
 Errors in Zope 2.7.2 are mainly ReadConflictErrors with
 DCOracle2.DA.Procedure like:
 
 --
 2005-08-01T09:54:08 INFO(0) TM:65540 Failed to abort object
 Traceback (most recent call last):
   File /opt/Zope/2.7.2/lib/python/ZODB/Transaction.py, line 393, in 
 _commit_error
 j.abort(o, self)
   File /opt/Zope/2.7.2/lib/python/ZODB/Connection.py, line 561, in 
 setstate
 invalid = self._is_invalidated(obj)
   File /opt/Zope/2.7.2/lib/python/ZODB/Connection.py, line 590, in 
 _is_invalidated
 raise ReadConflictError(object=obj)
 ReadConflictError: database read conflict error (oid 000299de, 
 class Products.DCOracle2.DA.Procedure)
 --
 
 Other errors are like Shouldn't load state xxx when
 connection is closed but these are known bugs in older ZODB version.
 
 
 Zope 2.8 supports MVCC so we hoped that the number of
 errors decrease but... with Zope 2.8 we get about 129 internal
 server errors HTTP/1.1 500 and additionally a lot of 402 errors 
 (unauthorized).
 
 Errors 402 are because of internal server errors on login page
 (testing application continues test without checking if user has been
 properly logged in).
 
 In the event.log there are no conflict errors saved :-/ ,
 only unauthorized. We get the error from client responses
 and from console.
 
 I don't know what happens. May it be because of using old
 data.fs file (from 2.7.2) with Zope 2.8?
 
 Anybody has similiar experiences? Is Zope 2.8 useable??
 
 
 Below few errors from the console (runzope) and from user browser:
 
 
 2005-08-01 10:46:22 INFO ZODB conflict error at /crProd/acl_users/login 
 (16 conflicts since startup at 2005-08-01T10:45:58)
 2005-08-01 10:46:22 BLATHER Conflict traceback
 Traceback (most recent call last):
   File /opt/Zope/2.8.0/lib/python/ZPublisher/Publish.py, line 113, in 
 publish
 request, bind=1)
   File /opt/Zope/2.8.0/lib/python/ZPublisher/mapply.py, line 88, in mapply
 if debug is not None: return debug(object,args,context)
   File /opt/Zope/2.8.0/lib/python/ZPublisher/Publish.py, line 40, in 
 call_object
 result=apply(object,args) # Type scr to step into published object.
   File /opt/Zope/2.8.0/lib/python/Shared/DC/Scripts/Bindings.py, line 
 311, in __call__
 return self._bindAndExec(args, kw, None)
   File /opt/Zope/2.8.0/lib/python/Shared/DC/Scripts/Bindings.py, line 
 348, in _bindAndExec
 return self._exec(bound_data, args, kw)
   File 
 /opt/Zope/2.8.0/lib/python/Products/PythonScripts/PythonScript.py, 
 line 323, in _exec
 result = f(*args, **kw)
   File Script (Python), line 3, in login
   File /opt/Zope/2.8.0/lib/python/ZPublisher/HTTPRequest.py, line 
 1214, in __getattr__
 v = self.get(key, default, returnTaints=returnTaints)
   File /opt/Zope/2.8.0/lib/python/ZPublisher/HTTPRequest.py, line 
 1174, in get
 if callable(v): v = v()
   File 
 /opt/Zope/2.8.0/lib/python/Products/Sessions/SessionDataManager.py, 
 line 93, in getSessionData
 return self._getSessionDataObject(key)
   File 
 /opt/Zope/2.8.0/lib/python/Products/Sessions/SessionDataManager.py, 
 line 180, in _getSessionDataObject
 ob = container.new_or_existing(key)
   File /opt/Zope/2.8.0/lib/python/Products/Transience/Transience.py, 
 line 844, in new_or_existing
 item = self.get(key, _marker)
   File /opt/Zope/2.8.0/lib/python/Products/Transience/Transience.py, 
 line 491, in get
 item = self._move_item(k, current_ts, default)
   File /opt/Zope/2.8.0/lib/python/Products/Transience/Transience.py, 
 line 297, in _move_item
 abucket = self._data.get(ts, None) # XXX ReadConflictError hotspot
   File /opt/Zope/2.8.0/lib/python/ZODB/Connection.py, line 704, in 
 setstate
 self._setstate(obj)
   File /opt/Zope/2.8.0/lib/python/ZODB/Connection.py, line 757, in 
 _setstate
 self._load_before_or_conflict(obj)
   File /opt/Zope/2.8.0/lib/python/ZODB/Connection.py, line 768, in 
 _load_before_or_conflict
 raise ReadConflictError(object=obj)
 ReadConflictError: database read conflict error 

Re: [Zope] Zope 2.8 and conflict errors

2005-08-01 Thread Dieter Maurer
Maciej Wisniowski wrote at 2005-8-1 12:21 +0200:
 ...
Other errors are like Shouldn't load state xxx when
connection is closed but these are known bugs in older ZODB version.

Really?
I do not know such errors in any ZODB version.

I know these errors as persistency bugs in applications (among
others some of mine)...


-- 
Dieter
___
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 )


Re: [Zope] Zope 2.8 and conflict errors

2005-08-01 Thread Maciej Wisniowski



Other errors are like Shouldn't load state xxx when
connection is closed but these are known bugs in older ZODB version.
   



Really?
I do not know such errors in any ZODB version.

I know these errors as persistency bugs in applications (among
others some of mine)...

 


I've found this information here:
http://plone.org/documentation/error/loadstate

??

--
Maciej Wisniowski
___
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 )


Re: [Zope] Zope 2.8 and conflict errors

2005-08-01 Thread Maciej Wisniowski

I can't speak to the 500 errors you're receiving but Zope 2.8.0
500 is HTTP code, not the error count. I've written this in a 
messy way.



Zope 2.8.0 ships
with a TemporaryStorage implementation (used by sessions in the
default configuration) which does not implement MVCC.  The one in 2.8.1
(now in beta) and better will implement MVCC, so you *should* see
performance improve (or at least see fewer conflict errors while using
sessioning).
Today I wanted to install 2.8.1 but we had no time... :) 


Thanks for the info

--
Maciej Wisniowski

___
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 )