[ZODB-Dev] Problem with large transactions combined with
authentication mode
Per Sigmond
Per.Sigmond at itsopen.no
Sat Nov 29 08:09:42 EST 2003
Using ZODB3-3.2 (and other 3.2 versions as well) with ZEO I have problems with
big transactions. It seems the problems only arise when I start the server
with authentication protocol set (type digest). The problems seem to be
exposed best on fast machines, and happen on both Linux and Windows.
I can provoke the error (consistent) with the client code below. Turning off
authentication makes the error go away. The failure happens on different
messages every time, the failing 'load key' in the server error message is
random, or so it seems.
The error provoking client code:
#### start
from ZEO import ClientStorage
from ZODB import DB
from ZODB.PersistentList import PersistentList
storage =
ClientStorage.ClientStorage(('localhost',1919),username='testuser',password='testpassword')
db = DB(storage)
conn = db.open()
root = conn.root()
root['mybiglist'] = PersistentList([])
get_transaction().commit()
for i in range(10000):
root['mybiglist'].append("Hello, there. This is a text.")
get_transaction().commit()
#### end
The error I get on the server:
2003-11-29T14:02:30 ERROR(200) zrpc:4398 can't decode message:
'{<a\x85tP\xfa\xbe\x17\x84\x08\xa5[V[\xb1(\x0b\x05\xac(K...'
------
2003-11-29T14:02:30 ERROR(200) zrpc-conn:127.0.0.1:33068 Error caught in
asyncore
Traceback (most recent call last):
File
"/home/per/zodb/ZODB3-3.2/build/lib.linux-i686-2.2/ThreadedAsync/LoopCallback.py",
line 120, in poll
obj.handle_read_event()
File "/usr/lib/python2.2/asyncore.py", line 397, in handle_read_event
self.handle_read()
File "/home/per/zodb/ZODB3-3.2/build/lib.linux-i686-2.2/ZEO/zrpc/smac.py",
line 211, in handle_read
self.message_input(msg)
File
"/home/per/zodb/ZODB3-3.2/build/lib.linux-i686-2.2/ZEO/zrpc/connection.py",
line 230, in message_input
msgid, flags, name, args = self.marshal.decode(message)
File
"/home/per/zodb/ZODB3-3.2/build/lib.linux-i686-2.2/ZEO/zrpc/marshal.py", line
39, in decode
return unpickler.load() # msgid, flags, name, args
UnpicklingError: invalid load key, '{'.
------
2003-11-29T14:02:30 INFO(0) ZSS:4398/127.0.0.1:33068 disconnected during
transaction Transaction user=''
Error on the client:
Traceback (most recent call last):
File "bigtransbug.py", line 20, in ?
get_transaction().commit()
File
"/home/per/zodb/ZODB3-3.2/build/lib.linux-i686-2.2/ZODB/Transaction.py", line
244, in commit
vote(self)
File "/home/per/zodb/ZODB3-3.2/build/lib.linux-i686-2.2/ZODB/Connection.py",
line 698, in tpc_vote
s = vote(transaction)
File
"/home/per/zodb/ZODB3-3.2/build/lib.linux-i686-2.2/ZEO/ClientStorage.py",
line 833, in tpc_vote
self._server.vote(self._serial)
File "/home/per/zodb/ZODB3-3.2/build/lib.linux-i686-2.2/ZEO/ServerStub.py",
line 91, in vote
return self.rpc.call('vote', trans_id)
File
"/home/per/zodb/ZODB3-3.2/build/lib.linux-i686-2.2/ZEO/zrpc/connection.py",
line 367, in call
r_flags, r_args = self.wait(msgid)
File
"/home/per/zodb/ZODB3-3.2/build/lib.linux-i686-2.2/ZEO/zrpc/connection.py",
line 457, in wait
raise DisconnectedError()
ZEO.zrpc.error.DisconnectedError
--
Per Sigmond
CEO, ItsOpen as
Per.Sigmond at itsopen.no
http://www.itsopen.net
+47-90721913
More information about the ZODB-Dev
mailing list