Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Users

conflict error

 

 

Zope users RSS feed   Index | Next | Previous | View Threaded


ajprabu at yahoo

Nov 5, 2001, 2:09 PM

Post #1 of 9 (2563 views)
Permalink
conflict error

Hi,

We are getting a conflict when a page is trying to access a python object.
Can anyone solve this problem?

Prabu


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


lists at consulting

Nov 5, 2001, 2:34 AM

Post #2 of 9 (2444 views)
Permalink
Re: conflict error [In reply to]

On Tue, 2001-11-06 at 10:09, prabu wrote:
> Hi,
>
> We are getting a conflict when a page is trying to access a python object.
> Can anyone solve this problem?

No Prabu I'm pretty sure they can't because you haven't supplied any
information about the conflict.

Supply details of your relevant code and use your browser to view the
HTML source of the error page. Paste this in to your message so people
can read the error message itself and the traceback information.

Regards,
Adam


ulrich.wisser at relevanttraffic

Nov 9, 2004, 11:26 PM

Post #3 of 9 (2440 views)
Permalink
Re: Conflict error [In reply to]

Dennis Allison wrote:
> What version of Zope are you using? The session mechanism has been much
> improved in 2.7.X.

I will upgrade ASAP!


> bTW, conflict errors are indicators of a conflict *not* a real error.
> Zope serializes the access and continues.

Zope servers pages with lenghty technical error messages. You don't
suggest I tell my boss and our customers that they don't see actual
errors, do you?

Ulrich
_______________________________________________
Zope maillist - Zope [at] zope
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 )


allison at sumeru

Nov 9, 2004, 11:38 PM

Post #4 of 9 (2449 views)
Permalink
Re: Conflict error [In reply to]

There are a number of places where conflict errors can occur. They can
occur in the ZODB or they can occur in the temporary storage used for
session variable. Only some conflicts raise exceptions and get reported
out as errors to your users. If they persist after upgrades you might
look carefully at why they occur and modify your system accordingly.

On Wed, 10 Nov 2004, Ulrich Wisser wrote:

> Dennis Allison wrote:
> > What version of Zope are you using? The session mechanism has been much
> > improved in 2.7.X.
>
> I will upgrade ASAP!
>
>
> > bTW, conflict errors are indicators of a conflict *not* a real error.
> > Zope serializes the access and continues.
>
> Zope servers pages with lenghty technical error messages. You don't
> suggest I tell my boss and our customers that they don't see actual
> errors, do you?
>
> Ulrich
> _______________________________________________
> Zope maillist - Zope [at] zope
> 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 maillist - Zope [at] zope
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 )


jens at dataflake

Nov 10, 2004, 12:15 AM

Post #5 of 9 (2449 views)
Permalink
Re: Conflict error [In reply to]

On Nov 10, 2004, at 8:38, Dennis Allison wrote:

> There are a number of places where conflict errors can occur. They can
> occur in the ZODB or they can occur in the temporary storage used for
> session variable. Only some conflicts raise exceptions and get
> reported
> out as errors to your users. If they persist after upgrades you might
> look carefully at why they occur and modify your system accordingly.

In general it is not hard at all to write code in Zope that produces
"hot spots" that attract conflict errors, especially with
catalog-driven sites. Developers need to keep their eyes open for code
that e.g. unnecessarily changes objects or unnecessarily loads objects.
It's all easy to do in Python, but if the ease leads to sloppy code it
all comes crashing down.

jens

_______________________________________________
Zope maillist - Zope [at] zope
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 )


dieter at handshake

Nov 10, 2004, 11:56 AM

Post #6 of 9 (2439 views)
Permalink
Re: Conflict error [In reply to]

Jens Vagelpohl wrote at 2004-11-10 09:15 +0100:
> ...
>In general it is not hard at all to write code in Zope that produces
>"hot spots" that attract conflict errors, especially with
>catalog-driven sites. Developers need to keep their eyes open for code
>that e.g. unnecessarily changes objects or unnecessarily loads objects.
>It's all easy to do in Python, but if the ease leads to sloppy code it
>all comes crashing down.

A frame based design where several frames use sessions is
especially prone to session related conflicts...

--
Dieter
_______________________________________________
Zope maillist - Zope [at] zope
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 )


maciej.wisniowski at coig

Nov 20, 2006, 12:57 PM

Post #7 of 9 (2092 views)
Permalink
Re: Conflict error [In reply to]

> Often I see messages like the following in the event log:
>
> 2006-11-20T11:57:33 INFO ZPublisher.Conflict ConflictError at
> /<***some location***> : database conflict error (oid 0x03a7, class
> BTrees._OOBTree.OOBTree, serial this txn started with
> 0x0369ab934257a788 2006-11-20 16:51:15.549000, serial currently
> committed 0x0369ab9975fb5b99 2006-11-20 16:57:27.652000) (122
> conflicts (2 unresolved) since startup at Fri Nov 17 16:01:43 2006)
This specific message is just INFO, so it isn't visible to user, but
there is a statement abotut "(2 unresolved)" conflicts, and this is
worse because somebody has seen message about ConflicError.

Errors with OOBTree may be connected with session machinery. We had such
problems under high load and ZEO. Changing session_resolution_seconds
value in zope.conf to 300 solved the problem. You may try this but, if I
remember correctly, it will cause that your sessions timeout may be 300
secs longer and/or shorter. You may try other values.
It may be interesting what is <***some location***> too.


> I am also seeing the server go into some sort hard crash (actually it
> doesn't crash just seems to peg the cpu doing something) ...that seems
> related. (but I am not totally sure). Sometimes it "magically"
> recovers but more often than not I have to restart the service to get
> some sense of normality.
So what is a 'crash' for you? Any errors in event
log or Zope just doesn't answer for a long time? If the latter thing
then there is a DeadlockDebugger that shows what is Zope doing, even
when it is not responsible, but I'm afraid that it won't work under
Windows, but I've never tried.

> What does this message mean -- should I be worried about it?
As far as you see only INFO it is nothing bad, but ERROR that
means conflict error was unresolved is visible to the user, although
hitting 'Refresh' usually is enough.

There you may find some informations (but this is based on zope 2.7):
http://www.plope.com/Members/dunny/conflicts/view

--
Maciej Wisniowski

_______________________________________________
Zope maillist - Zope [at] zope
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 )


briansullivan at gmail

Nov 22, 2006, 8:43 AM

Post #8 of 9 (2060 views)
Permalink
Re: Conflict error [In reply to]

On 11/20/06, Maciej Wisniowski <maciej.wisniowski [at] coig> wrote:
> > Often I see messages like the following in the event log:
> >
> > 2006-11-20T11:57:33 INFO ZPublisher.Conflict ConflictError at
> > /<***some location***> : database conflict error (oid 0x03a7, class
> > BTrees._OOBTree.OOBTree, serial this txn started with
> > 0x0369ab934257a788 2006-11-20 16:51:15.549000, serial currently
> > committed 0x0369ab9975fb5b99 2006-11-20 16:57:27.652000) (122
> > conflicts (2 unresolved) since startup at Fri Nov 17 16:01:43 2006)
> This specific message is just INFO, so it isn't visible to user, but
> there is a statement abotut "(2 unresolved)" conflicts, and this is
> worse because somebody has seen message about ConflicError.
>
> Errors with OOBTree may be connected with session machinery. We had such
> problems under high load and ZEO. Changing session_resolution_seconds
> value in zope.conf to 300 solved the problem. You may try this but, if I
> remember correctly, it will cause that your sessions timeout may be 300
> secs longer and/or shorter. You may try other values.
> It may be interesting what is <***some location***> too.


It seems always to be the same location (but that is the page that is
always displayed for non adminstrative users so that is no suprise)



>
>
> > I am also seeing the server go into some sort hard crash (actually it
> > doesn't crash just seems to peg the cpu doing something) ...that seems
> > related. (but I am not totally sure). Sometimes it "magically"
> > recovers but more often than not I have to restart the service to get
> > some sense of normality.
> So what is a 'crash' for you?

In this case it just pegs the cpu running the python zope process at near 100%.

> Any errors in event
> log or Zope just doesn't answer for a long time? If the latter thing
> then there is a DeadlockDebugger that shows what is Zope doing, even
> when it is not responsible, but I'm afraid that it won't work under
> Windows, but I've never tried.



I will have a look to see if it provides any information.


>
> > What does this message mean -- should I be worried about it?
> As far as you see only INFO it is nothing bad, but ERROR that
> means conflict error was unresolved is visible to the user, although
> hitting 'Refresh' usually is enough.

It seems that just having the error in info is not a problem but what
I am seeing is that often after an "unresolved" instance my problem
happens.


>
> There you may find some informations (but this is based on zope 2.7):
> http://www.plope.com/Members/dunny/conflicts/view
>

I will look there to see if there is anything that seems relavent.
_______________________________________________
Zope maillist - Zope [at] zope
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 )


miles at jamkit

Mar 20, 2009, 2:17 PM

Post #9 of 9 (1616 views)
Permalink
Re: Conflict error [In reply to]

Hi,

Thanks Tres. I got to the bottom of what was happening.

An attribute was being renamed "transparently" using the following code:

def getConnection(self):
if getattr(self, '_connection', None):
self.db_connection = self._connection
return self.db_connection

Obviously, this fires every time getConnection is called, setting the
attribute and therefore making the database commit. For reference, it
should have been:

def getConnection(self):
if getattr(self, '_connection', None):
self.db_connection = self._connection
delattr(self, '_connection')
return self.db_connection

This only commits to the database once.

Also out of interest, I found a handy way to find out what was going on,
that I haven't come across previously, that might be of interest:

>>> app._p_jar._registered_objects
[]
>>> component.getConnection()
>>> app._p_jar._registered_objects
[MyComponent.MyComponent]
>>> app._p_jat._registered_objects[0].__dict__
{....}

Basically I used it to work out which call caused the object to register
with the transaction. In this case, there were only a couple of methods
that got called, so it was more to verify it didn't get registered any
more (the test case was "intermittent", i.e. only for the client :-/ ).

Anyway, might be useful for someone,

Cheers,

Miles





_______________________________________________
Zope maillist - Zope [at] zope
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 users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.