[ZODB-Dev] ZEO: StorageTransactionError

Jeremy Hylton jeremy at zope.com
Fri May 30 00:04:29 EDT 2003


[Sorry for the delay.  It's been busy around here.]

On Tue, 2003-05-27 at 12:14, fzachman wrote:
> StorageTransactionError: Multiple simultaneous tpc_begin requests from
> one client.
> 
> After this the site was locked up and the person on staff set them back
> up to using the old system, where it's back and running again with no
> problems.

It sounds like the problem here is that the client that called tpc_begin
a second time failed to complete the transaction as a result.  It's hard
to know what exactly happened, but if it got so far as calling
tpc_vote() with the transaction before calling tpc_begin() again, it
could wedge the storage server.

Do you mean that the client was hung?  Or that the server was hung?
(Note that there is a transaction timeout feature in ZEO that could at
least keep the server from hanging.)

> I tried running the usual queries on this and couldn't find anything
> short of cvs checkin logs.  The offending bit of code seems to be in the
> StorageServer's tpc_begin:
> 
>     def tpc_begin(self, id, user, description, ext, tid, status):
>         if self.read_only:
>             raise ReadOnlyError()
>         if self.transaction is not None:
>             if self.transaction.id == id:
>                 self.log("duplicate tpc_begin(%s)" % repr(id))
>                 return
>             else:
>                 raise StorageTransactionError("Multiple simultaneous
> tpc_begin"
>                                               " requests from one
> client.")
> 
> I confess I'm not entirely sure what's going on here as I've just taken
> to maintaining this setup and I'm not all that familiar with ZEO.  It
> seems that the client tried to begin more than once, and the second (or
> x subsequent) time it somehow had a different transaction id?

It's hard to fathom how the client started the transaction twice.  Is
there anything in the debug logs that shows the StorageTransactionError
on the client side?  If so, it might provide some idea of what went
wrong.  

Can you reproduce this problem?  If you turn on more logging on client
and server, you should be able to get a trace that has more info.

> I'm not sure if this is an issue with Zope 2.6.1 or with the use of the
> Berkeley DB. (I hate upgrading 2 things at once. ;)

What happens if you just use the new Zope and not Berkeley DB?

> Has anyone else encountered this?

I don't recall ever seeing a bug report for something like this.

> Oh, and for completeness:
> 
> Redhat 8.0
> Python 2.1.3
> ZEO 2.0.1b

Are you using a ZEO beta release as opposed to a final release?  I'd
upgrade to a final release to be on the safe side, though I don't recall
any bug fixes that would affect this.

Jeremy





More information about the ZODB-Dev mailing list