[ZODB-Dev] cPickleCache: "Cache values may only be in onecache" error

Dieter Maurer dieter at handshake.de
Wed Jan 28 19:01:25 EST 2004


Andreas Jung wrote at 2004-1-28 09:06 +0100:
> ...
>Well, after disabling refresh for this particular I can see this problem 
>again :-(
>In addition I see that the error is now raised sometimes in the Transience 
>module:
> ...
>    * Module ZODB.Connection, line 425, in commit
>      __traceback_info__: (('Products.Transience.Transience', 'Increaser'), 
>'\x00\x00\x00\x00\x00\x00\x00\x0b', '')
>
>ValueError: Cache values may only be in one cache.

This means that you are using sessions (although you may not be aware
of it).

>and also again somewhere in the BTrees:
> ...
>    * Module ZODB.Connection, line 425, in commit
>      __traceback_info__: (('BTrees.OOBTree', 'OOBTree'), 
>'\x00\x00\x00\x00\x00\x00\x00(', '')
>
>ValueError: Cache values may only be in one cache.
>
>Since my setup is completely straight forward without any tricks and 
>without false bottom this
>appears like a severe problem to me....but no idea how to resolve this.


Usually, this error occurs when either:

  *  a persistent object is referenced from some form of
     connection independent cache (a global variable, a dictionary,
     an attribute of a module global instance, ...)

  *  a persistent object is passed on to a different thread

  *  a persistent object from one connection is assigned to
     an attribute of a different connection

Looking at the code, it looks unlikely that any of these
reasons apply to a "Products.Transience.Transience.Increaser"
instance.

Maybe, you can catch the exception and output "self"
and "object._p_jar" (these values should be identical,
unless "object._p_jar" is "None").

-- 
Dieter



More information about the ZODB-Dev mailing list