Re: [Zope-dev] Conflict Errors; how to track them down?

2003-06-04 Thread Shane Hathaway
Bjorn Stabell wrote:
In any case, is there no way to find out more detailed information about
why a conflict happened?  There must be some oids somewhere?
I don't know of a way.  In a conflict, the transaction gets aborted, so 
the only data left is the log entry.

Shane

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Conflict Errors; how to track them down?

2003-06-04 Thread Dieter Maurer
Bjorn Stabell wrote at 2003-6-3 11:08 +0800:
  Except for SARS, another problem that's been plagueing us for months are
  seemingly random Conflict Errors.  We see about 10 every day on our Zope
  2.6.1, and they can happen on any page.  In most cases they are not
  related to pages that actually updated anything (AFAIK), although we do
  use SESSIONS (but no frames).  Any clue how to track down which objects
  are having problems, what's causing this?
  
  --
  2003-06-03T09:08:10 INFO(0) ZODB conflict error at
  /VirtualHostBase/http/www.beijingsammies.com:80/sammies/VirtualHostRoot/
  (7 conflicts since startup at 2003-06-02T13:15:05) 

The log message for conflict errors is far less instructive than
it could be (almost without any effort).

  It should indicate whether it is a ReadConflictError or
  a (Write)ConflictError.

  It should tell which object caused the conflict.


The attached patch to Zope/App/startup.py provides this
additional information.

Please file a feature request to http://collector.zope.org/Zope.


Dieter

--- startup.py~	2003-02-28 16:59:25.0 +0100
+++ startup.py	2003-03-17 11:13:28.0 +0100
@@ -140,9 +140,9 @@
 global conflict_errors
 conflict_errors = conflict_errors + 1
 method_name = REQUEST.get('PATH_INFO', '')
-err = ('ZODB conflict error at %s '
+err = ('ZODB conflict error at %s: %s'
'(%s conflicts since startup at %s)')
-LOG(err % (method_name, conflict_errors, startup_time),
+LOG(err % (method_name, str(v), conflict_errors, startup_time),
 INFO, '')
 LOG('Conflict traceback', BLATHER, '', error=sys.exc_info())
 raise ZPublisher.Retry(t, v, traceback)


Re: [Zope-dev] Conflict Errors; how to track them down?

2003-06-04 Thread Chris Withers
Dieter Maurer wrote:
The attached patch to Zope/App/startup.py provides this
additional information.
Where's the patch?

cheers,

Chris

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Conflict Errors; how to track them down?

2003-06-04 Thread Jamie Heilman
Chris Withers wrote:
 Dieter Maurer wrote:
 
 The attached patch to Zope/App/startup.py provides this
 additional information.
 
 Where's the patch?

http://marc.theaimsgroup.com/?l=zope-devm=105466926610469q=p3

-- 
Jamie Heilman   http://audible.transient.net/~jamie/
I was in love once -- a Sinclair ZX-81.  People said, No, Holly, she's 
 not for you. She was cheap, she was stupid and she wouldn't load 
 -- well, not for me, anyway.  -Holly

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Conflict Errors; how to track them down?

2003-06-03 Thread Shane Hathaway
On 06/02/2003 11:08 PM, Bjorn Stabell wrote:
Hi all,

Except for SARS, another problem that's been plagueing us for months are
seemingly random Conflict Errors.  We see about 10 every day on our Zope
2.6.1, and they can happen on any page.  In most cases they are not
related to pages that actually updated anything (AFAIK), although we do
use SESSIONS (but no frames).  Any clue how to track down which objects
are having problems, what's causing this?
Look at your undo log.  If the conflicts don't correspond with entries 
in the undo log, and you're not mounting other databases, the conflicts 
are almost certainly due to sessions.  However, conflicts are a normal 
occurrence and rarely reach the user.  Zope automatically retries the 
request and delivers the successful page.

Shane

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


RE: [Zope-dev] Conflict Errors; how to track them down?

2003-06-03 Thread Bjorn Stabell
On 06/02/2003 11:08 PM, Bjorn Stabell wrote:
  Except for SARS, another problem that's been plagueing us for months

  are seemingly random Conflict Errors.  We see about 10 every day on 
  our Zope 2.6.1, and they can happen on any page.  In most  cases
they 
  are not related to pages that actually updated anything (AFAIK), 
  although we do use SESSIONS (but no frames).  Any clue how to track 
  down which objects are having problems, what's causing this?

Shane wrote:
 Look at your undo log.  If the conflicts don't correspond 
 with entries in the undo log, and you're not mounting other databases,
the 
 conflicts  are almost certainly due to sessions.  However, conflicts
are 
 a normal  occurrence and rarely reach the user.  Zope automatically
retries the 
 request and delivers the successful page.

They do not always correspond to entries in the undo log.  But the ones
that do are always (?) committed successfully.  The problem is, as I can
see from other threads here, that they are related to other systems that
cannot be rolled back (e.g., sending email / faxes), so we get duplicate
emails / faxes.  I'll look at how to wrap these systems in
transaction-aware wrappers, as was mentioned in a related thread.

In any case, is there no way to find out more detailed information about
why a conflict happened?  There must be some oids somewhere?

Regards,
-- 
Bjorn

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )