Re: [Zope] database conflict error on startup - disabling Five

2008-12-01 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dieter Maurer wrote:
> Dylan Jay wrote at 2008-12-1 10:22 +1100:
>> ...
>>> You are right. Almost surely, you see a "Five" bug: "Five", too, should
>>> respect "enable-product-installation".
>>>
>>> You can see the right transaction handling in
>>> "OFS.Application.install_product' -- somewhere near the buttom of this
>>> function.
>>> Maybe, you correct "Five" accordingly.
>> I applied this guys patch which seems to have fixed the problem
>> http://archives.free.net.ph/message/20080516.100305.16f90017.en.html
>>
>> He's asking if that is the right way to patch it. Is it? 
> 
> It looks not bad.
> 
>> And if so what is the right way to get it into the Five 1.4 branch? 
> 
> Write a bug report, attach the patch and for a quicker response
> inform a "Five" maintainer about the "bug+solution".
> 
> I am not sure however, that this will be sufficient: "Zope 2.9"
> is no longer an actively maintained version; maybe the maintainers
> think there are more important tasks that to fix problems with
> older versions.

It is true that we are unlikely to make another 2.9.x release, absent a
 serious security bug.  However, in Zope 2.9, the Five product was
maintained as an SVN external:  the branch currently points to:
svn://svn.zope.org/repos/main/Products.Five/tags/1.3.11

I could certainly see shipping a 1.3.12 version of the product (or a
1.4.5), which people could then install in their $INSTANCE_HOME,
overriding the one in $SOFTWARE_HOME.  In fact, the changelog on the 1.4
branch seems to indicate that there is fix for the same problem already
checked in.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJNDRq+gerLs4ltQ4RAjW7AJ0ccCbDcR4Qu0OA1U4ysYOh5Xzn9gCcDCl6
IsBWY1Rfod6g01zZDSoPfmk=
=0JmR
-END PGP SIGNATURE-

___
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] database conflict error on startup - disabling Five

2008-12-01 Thread Dieter Maurer
Dylan Jay wrote at 2008-12-1 10:22 +1100:
> ...
>> You are right. Almost surely, you see a "Five" bug: "Five", too, should
>> respect "enable-product-installation".
>> 
>> You can see the right transaction handling in
>> "OFS.Application.install_product' -- somewhere near the buttom of this
>> function.
>> Maybe, you correct "Five" accordingly.
>
>I applied this guys patch which seems to have fixed the problem
>http://archives.free.net.ph/message/20080516.100305.16f90017.en.html
>
>He's asking if that is the right way to patch it. Is it? 

It looks not bad.

>And if so what is the right way to get it into the Five 1.4 branch? 

Write a bug report, attach the patch and for a quicker response
inform a "Five" maintainer about the "bug+solution".

I am not sure however, that this will be sufficient: "Zope 2.9"
is no longer an actively maintained version; maybe the maintainers
think there are more important tasks that to fix problems with
older versions.



-- 
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] database conflict error on startup - disabling Five

2008-11-30 Thread Dieter Maurer
Dylan Jay wrote at 2008-11-30 08:46 +1100:
> ...
>> When you have a multi ZEO client setup, you should have a single
>> client distinguished responsible to keep "Control_Panel/products"
>> up to date. There is a configuration option for this ("*enable*product*").
>> Set it to "on" in this distinguished client and to "off" in all others.
>> This avoids "ConflictError"s during startup.
>
>Thanks for the tip but it didn't solve the problem. 
>The conflict error is coming from Five zcml registration steps so I guess
>"enable-product-installation off" doesn't help with that.

You are right. Almost surely, you see a "Five" bug: "Five", too, should
respect "enable-product-installation".

You can see the right transaction handling in
"OFS.Application.install_product' -- somewhere near the buttom of this
function.
Maybe, you correct "Five" accordingly.


>Any idea why this is happening to me
>and doesn't seem to be a common problem
>others come across?

"ConflictError"s are apparently nondeterministic errors -- they
only occur when concurrent transactions conflict with one another.

Apparently, in your setup, the conflict probability is especially
high (maybe because it is especially expensive to register your
package).

In principle, others are threatened as well if the are using
"registerPackage".


I do not have Zope 2.9 with its "Five". In Zope 2.11, the "Five" code
appears to have been cleaned up. This means, upgrading to Zope 2.11
may be another option for you.



-- 
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] database conflict error on startup - disabling Five

2008-11-29 Thread Dieter Maurer
djay75 wrote at 2008-11-26 15:38 -0800:
>
>Hi, I'm getting the following error during startup of a zeo with 3 instances.
>It doesn't happen with one instance. It's zope2.9.8, plone 2.5 and the Five
>1.4 svn branch.
>
>I thought the Five svn branch might help based on this thread
>http://archives.free.net.ph/message/20080520.172500.38ab3445.en.html 
>but no luck. 
>
>2008-11-25T00:37:49 ERROR Zope Couldn't install Five
>Traceback (most recent call last):
>  File "c:\zope\2.9.8\Zope\lib\python\OFS\Application.py", line 783, in
>install_product
>initmethod(context)
> ...
>self._commit(transaction)
>  File "c:\zope\2.9.8\Zope\lib\python\ZODB\Connection.py", line 518, in
>_commit
>raise ConflictError(object=obj)
>ConfigurationExecutionError: ZODB.POSException.ConflictError: database
>conflict error (oid 0x1338, class App.Product.Product)

The Zope startup process is very sensible for exceptions of all
kinds (at least in debug mode, in production mode they are ignored),
including "ConflictError". Unlike during normal operation, there
is no retry after a "ConflictError".

When you have a multi ZEO client setup, you should have a single
client distinguished responsible to keep "Control_Panel/products"
up to date. There is a configuration option for this ("*enable*product*").
Set it to "on" in this distinguished client and to "off" in all others.
This avoids "ConflictError"s during startup.



-- 
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] database conflict error

2007-07-14 Thread Dieter Maurer
Sudesh soni wrote at 2007-7-13 12:47 -0400:
> ...
>I am recieving following errors frequently as shown below:
>
>#1-
>
>Site Error
>An error was encountered while publishing this resource. 
>
>Error Type: ConflictError
>Error Value: database conflict error (oid 0x09, class 
>Products.Transience.Transience.Increaser, serial this txn started with 
>0x036ee0b224215066 2007-07-09 
>
>16:50:08.468000, serial currently committed 0x036ee0b39eee 2007-07-09 
>16:51:37.25)

This is a session conflict. Apparently, you have concurrent requests
accessing the same session objects.

While the "Increaser" implements application specific conflict
resolution, the "TemporaryStorage" often has not enough history
to allow conflict resolution.

>#2
>
>database conflict error (oid 0x7b61, class BTrees._OOBTree.OOBTree, serial 
>this txn started with 0x036ee63aae219655 2007-07-10 16:26:40.812000, serial 
>
>currently committed 0x036ee63b55aa87bb 2007-07-10 16:27:20.078000)

This might also be a session related conflict: the relatively small
"oid" may indicate this.

If this is indeed the case, then Andreas' advice will not work.
You can recognize this when the object retrieved by Andreas' proposal
is something else than an "OOBTree".



-- 
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] database conflict error

2007-07-13 Thread Andreas Jung



--On 13. Juli 2007 12:47:33 -0400 Sudesh soni 
<[EMAIL PROTECTED]> wrote:



BlankHi,

I am recieving following errors frequently as shown below:

# 1---
# --

Site Error
An error was encountered while publishing this resource.

Error Type: ConflictError
Error Value: database conflict error (oid 0x09, class
Products.Transience.Transience.Increaser, serial this txn started with
0x036ee0b224215066 2007-07-09

16:50:08.468000, serial currently committed 0x036ee0b39eee 2007-07-09
16:51:37.25)

# 2---
# -

database conflict error (oid 0x7b61, class BTrees._OOBTree.OOBTree,
serial this txn started with 0x036ee63aae219655 2007-07-10
16:26:40.812000, serial

currently committed 0x036ee63b55aa87bb 2007-07-10 16:27:20.078000)



Identify the corresponding object through a script (which you need to run
through "zopectl run ..."

from ZODB.util import p64
print app._p_jar[p64(your_oid)]

If necessary implement application level conflict resolution by
implementing a _p_resolveConflict() handler (check with the various
ZODB docs on zope.org).

-aj




pgp6FdzNKHGje.pgp
Description: PGP signature
___
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 )