[Zope-dev] How bad _are_ ConflictErrors

Dieter Maurer dieter at handshake.de
Tue Nov 22 14:32:01 EST 2005


Chris Withers wrote at 2005-11-21 16:33 +0000:
> ...
>here's a line from one of our event logs:
>
>2005-11-17T08:00:27 INFO(0) ZODB conflict error at /some_uri
>(347 conflicts since startup at 2005-11-08T17:56:20)
>
>What is this telling me?

It is incredibly stupid.

The message above only tells you, that (at the given time)
a request for "/some_uri" resulted in a "ConflictError"
and that since startup (at the given time) 347 conflicts occured.

Unfortunately, it does not tell you

  *  what object caused the conflict

  *  whether it is a read or a write conflict
     (read conflicts are very rare since MVCC introduction,
     but they may still happen)

  *  for write conflicts: what versions of the object did particate

A long time ago, I posted an
extension making this additional information available (it
is all present in the exception instance. Zope is just too stupid
to read (and log) it).

>Did the user actually see a ConflictError page?

Usually not.

>Or was this error successfully resolved?

It may (or may not) later be resolved. This is still not clear
when the message is generated.

>What object did this ConflictError occur on and/or how can I modify my 
>our Zope instances to find out where the conflict was occurring?

See above -- search the archive for the extension...


>Now, when should the number of ConflictErrors logged in this way start 
>to become worrying?

When you start to see lots on them (per time unit).


>I analysed the logs from our cluster and we're getting about 450 
>conflict errors in our busiest hours when the cluster of 8 ZEO clients 
>is taking about 11,000 hits in that hour.
>
>Is this 'bad'?

I would not be happy: it is about 5 %.

This gives quite some chance that your customers see failures
caused by the conflicts (when 3 repetitions are not enough).

>If so, where should I start to make things better?

You find out which objects cause the conflicts.

You analyse what you can do to reduce concurrent writes
to these objects (split into separate persistent subobjects)
or whether you can provide conflict resolution.

-- 
Dieter


More information about the Zope-Dev mailing list