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

Dieter Maurer dieter@handshake.de
Tue, 3 Jun 2003 20:42:07 +0200


--FLHaanSf5A
Content-Type: text/plain; charset=us-ascii
Content-Description: message body text
Content-Transfer-Encoding: 7bit

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


--FLHaanSf5A
Content-Type: application/x-patch
Content-Description: Patch for "Zope/App/startup.py" to provide better ConflictError messages
Content-Disposition: attachment;
	filename="conflict_report.pat"
Content-Transfer-Encoding: base64

LS0tIHN0YXJ0dXAucHl+CTIwMDMtMDItMjggMTY6NTk6MjUuMDAwMDAwMDAwICswMTAwCisr
KyBzdGFydHVwLnB5CTIwMDMtMDMtMTcgMTE6MTM6MjguMDAwMDAwMDAwICswMTAwCkBAIC0x
NDAsOSArMTQwLDkgQEAKICAgICAgICAgICAgICAgICBnbG9iYWwgY29uZmxpY3RfZXJyb3Jz
CiAgICAgICAgICAgICAgICAgY29uZmxpY3RfZXJyb3JzID0gY29uZmxpY3RfZXJyb3JzICsg
MQogICAgICAgICAgICAgICAgIG1ldGhvZF9uYW1lID0gUkVRVUVTVC5nZXQoJ1BBVEhfSU5G
TycsICcnKQotICAgICAgICAgICAgICAgIGVyciA9ICgnWk9EQiBjb25mbGljdCBlcnJvciBh
dCAlcyAnCisgICAgICAgICAgICAgICAgZXJyID0gKCdaT0RCIGNvbmZsaWN0IGVycm9yIGF0
ICVzOiAlcycKICAgICAgICAgICAgICAgICAgICAgICAgJyglcyBjb25mbGljdHMgc2luY2Ug
c3RhcnR1cCBhdCAlcyknKQotICAgICAgICAgICAgICAgIExPRyhlcnIgJSAobWV0aG9kX25h
bWUsIGNvbmZsaWN0X2Vycm9ycywgc3RhcnR1cF90aW1lKSwKKyAgICAgICAgICAgICAgICBM
T0coZXJyICUgKG1ldGhvZF9uYW1lLCBzdHIodiksIGNvbmZsaWN0X2Vycm9ycywgc3RhcnR1
cF90aW1lKSwKICAgICAgICAgICAgICAgICAgICAgSU5GTywgJycpCiAgICAgICAgICAgICAg
ICAgTE9HKCdDb25mbGljdCB0cmFjZWJhY2snLCBCTEFUSEVSLCAnJywgZXJyb3I9c3lzLmV4
Y19pbmZvKCkpCiAgICAgICAgICAgICAgICAgcmFpc2UgWlB1Ymxpc2hlci5SZXRyeSh0LCB2
LCB0cmFjZWJhY2spCg==
--FLHaanSf5A--