[ZODB-Dev] zeopack error in zrpc.connection

2013-01-07 Thread Claudiu Saftoiu
I noticed my DB had swelled to 132 gigabytes (as of 3 days ago; it's 160
gigabytes today) and it seems to be because zeopack has started failing:

tsa@sp2772c:~/db$ /home/tsa/env/bin/zeopack -u /home/tsa/db/zeo.sock
Traceback (most recent call last):
  File /home/tsa/env/lib/python2.6/site-packages/ZEO/scripts/zeopack.py,
line 159, in _main
cs.pack(packt, wait=True)
  File /home/tsa/env/lib/python2.6/site-packages/ZEO/ClientStorage.py,
line 916, in pack
return self._server.pack(t, wait)
  File /home/tsa/env/lib/python2.6/site-packages/ZEO/ServerStub.py, line
155, in pack
self.rpc.call('pack', t, wait)
  File /home/tsa/env/lib/python2.6/site-packages/ZEO/zrpc/connection.py,
line 730, in call
raise inst # error raised by server
TypeError: 'NoneType' object does not support item assignment
Error:
Error packing storage 1 in '/home/tsa/db/zeo.sock'


The runzeo log is:

2013-01-07T11:29:11 INFO ZEO.StorageServer new connection :
ManagedServerConnection 
--
2013-01-07T11:29:11 INFO ZEO.zrpc.Connection(S) () received handshake
'Z3101'
--
2013-01-07T11:29:11 INFO ZEO.StorageServer pack(time=1357576151.4019079)
started...
--
2013-01-07T11:55:37 ERROR ZEO.zrpc (8174) Error raised in delayed method
None
--
2013-01-07T11:55:37 INFO ZEO.StorageServer disconnected


The zeo.conf is:

%define INSTANCE .

zeo
  address $INSTANCE/zeo.sock
  read-only false
  invalidation-queue-size 100
  pid-filename $INSTANCE/zeo.pid
/zeo

blobstorage 1
  filestorage
path $INSTANCE/Data.fs
  /filestorage
  blob-dir $INSTANCE/blobs
/blobstorage


I tried shutting down the server that uses the database and re-running
zeopack, but the same thing happened.

I also tried re-starting 'runzeo' and re-running the pack (with the server
still off), and the same thing happened yet again.

How do I go about fixing this? Let me know if I can provide any other
information that would be helpful.

Thanks in advance,
- Claudiu
___
For more information about ZODB, see http://zodb.org/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] zeopack error in zrpc.connection

2013-01-07 Thread Claudiu Saftoiu
 How do I go about fixing this? Let me know if I can provide any other
 information that would be helpful.


I took the advice in this thread:
https://mail.zope.org/pipermail/zodb-dev/2012-January/014526.html

The exception that comes up, from the zeo server log, is:

2013-01-07T13:01:49 ERROR ZEO.zrpc (14891) Error raised in delayed method
Traceback (most recent call last):
  File /home/tsa/env/lib/python2.6/site-packages/ZEO/StorageServer.py,
line 1377, in run
result = self._method(*self._args)
  File /home/tsa/env/lib/python2.6/site-packages/ZEO/StorageServer.py,
line 343, in _pack_impl
self.storage.pack(time, referencesf)
  File /home/tsa/env/lib/python2.6/site-packages/ZODB/blob.py, line 796,
in pack
result = unproxied.pack(packtime, referencesf)
  File
/home/tsa/env/lib/python2.6/site-packages/ZODB/FileStorage/FileStorage.py,
line 1078, in pack
pack_result = self.packer(self, referencesf, stop, gc)
  File
/home/tsa/env/lib/python2.6/site-packages/ZODB/FileStorage/FileStorage.py,
line 1034, in packer
opos = p.pack()
  File
/home/tsa/env/lib/python2.6/site-packages/ZODB/FileStorage/fspack.py,
line 397, in pack
self.gc.findReachable()
  File
/home/tsa/env/lib/python2.6/site-packages/ZODB/FileStorage/fspack.py,
line 190, in findReachable
self.findReachableAtPacktime([z64])
  File
/home/tsa/env/lib/python2.6/site-packages/ZODB/FileStorage/fspack.py,
line 275, in findReachableAtPacktime
for oid in self.findrefs(pos):
  File
/home/tsa/env/lib/python2.6/site-packages/ZODB/FileStorage/fspack.py,
line 328, in findrefs
return self.referencesf(self._file.read(dh.plen))
  File /home/tsa/env/lib/python2.6/site-packages/ZODB/serialize.py, line
630, in referencesf
u.noload()
TypeError: 'NoneType' object does not support item assignment


I'm afraid this doesn't seem to help me figure out what's wrong...

- Claudiu
___
For more information about ZODB, see http://zodb.org/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] zeopack error in zrpc.connection

2013-01-07 Thread Jim Fulton
On Mon, Jan 7, 2013 at 1:04 PM, Claudiu Saftoiu csaft...@gmail.com wrote:

 How do I go about fixing this? Let me know if I can provide any other
 information that would be helpful.


 I took the advice in this thread:
 https://mail.zope.org/pipermail/zodb-dev/2012-January/014526.html

 The exception that comes up, from the zeo server log, is:

 2013-01-07T13:01:49 ERROR ZEO.zrpc (14891) Error raised in delayed method
 Traceback (most recent call last):
   File /home/tsa/env/lib/python2.6/site-packages/ZEO/StorageServer.py,
 line 1377, in run
 result = self._method(*self._args)
   File /home/tsa/env/lib/python2.6/site-packages/ZEO/StorageServer.py,
 line 343, in _pack_impl
 self.storage.pack(time, referencesf)
   File /home/tsa/env/lib/python2.6/site-packages/ZODB/blob.py, line 796,
 in pack
 result = unproxied.pack(packtime, referencesf)
   File
 /home/tsa/env/lib/python2.6/site-packages/ZODB/FileStorage/FileStorage.py,
 line 1078, in pack
 pack_result = self.packer(self, referencesf, stop, gc)
   File
 /home/tsa/env/lib/python2.6/site-packages/ZODB/FileStorage/FileStorage.py,
 line 1034, in packer
 opos = p.pack()
   File
 /home/tsa/env/lib/python2.6/site-packages/ZODB/FileStorage/fspack.py, line
 397, in pack
 self.gc.findReachable()
   File
 /home/tsa/env/lib/python2.6/site-packages/ZODB/FileStorage/fspack.py, line
 190, in findReachable
 self.findReachableAtPacktime([z64])
   File
 /home/tsa/env/lib/python2.6/site-packages/ZODB/FileStorage/fspack.py, line
 275, in findReachableAtPacktime
 for oid in self.findrefs(pos):
   File
 /home/tsa/env/lib/python2.6/site-packages/ZODB/FileStorage/fspack.py, line
 328, in findrefs
 return self.referencesf(self._file.read(dh.plen))
   File /home/tsa/env/lib/python2.6/site-packages/ZODB/serialize.py, line
 630, in referencesf
 u.noload()
 TypeError: 'NoneType' object does not support item assignment


 I'm afraid this doesn't seem to help me figure out what's wrong...

I suspect your database is corrupted.  You'd probably want to look at
the record in question to be sure.

You could disable garbage collection, but if you have a damaged
record, you might want to use the previous version of the record
(if it exists) to recover it.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
For more information about ZODB, see http://zodb.org/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] zeopack error in zrpc.connection

2013-01-07 Thread Claudiu Saftoiu

  I'm afraid this doesn't seem to help me figure out what's wrong...

 I suspect your database is corrupted.  You'd probably want to look at
 the record in question to be sure.


Sure, I've re-run the pack and will dump the pickled object to a file to
inspect it - is that what you meant? (How else would I figure out what the
record is?)


 You could disable garbage collection, but if you have a damaged
 record, you might want to use the previous version of the record
 (if it exists) to recover it.


What do you mean by disable garbage collection - you mean disable removing
old versions of records that are no longer used? I can't do that
unfortunately, the database gets too large.

How would I go about attempting to find the previous version of the record?
If I know what the record is I can just decide whether to let it be lost -
would catching the TypeError and 'pass'ing accomplish that?

Thanks,
- Claudiu
___
For more information about ZODB, see http://zodb.org/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev