[ZODB-Dev] BerkeleyDB and copyTransactionsFrom()

Andrew Sydelko sydelko@csociety.purdue.edu
Mon, 17 Sep 2001 15:01:10 -0500


I'm trying to copy what I have
in a Data.fs (1.3GB) to a BerkeleyDB
Full database.

Here is the script I used:

#!/data/www/Zope/bin/python
 
import sys
  
sys.path.append('/data/www/Zope/Zope/lib/python/ZODB')
sys.path.append('/data/www/Zope/Zope/lib/python')
sys.path.append('/data/www/Zope/lib/python2.1/site-packages/bsddb3Storage')
   
    
from Full import Full
from FileStorage import FileStorage
     
srcfile = 'Data.fs'
dstfile = 'bsddb3Storage'
      
src = FileStorage('Data.fs')
dst = Full('var', dstfile)
        
dst.copyTransactionsFrom(src)
	 
src.close()
dst.close()

And after running for a few minutes, I get this error:

Traceback (most recent call last):
  File "./copy.py", line 24, in ?
    dst.copyTransactionsFrom(src)
  File "/data/www/Zope.1/src/Zope-2.4.1-src/lib/python/ZODB/BaseStorage.py", line 297, in copyTransactionsFrom
    self.tpc_finish(transaction)
  File "/data/www/Zope.1/src/Zope-2.4.1-src/lib/python/ZODB/BaseStorage.py", line 231, in tpc_finish
    self._finish(self._serial, u, d, e)
  File "/data/www/Zope.1/lib/python2.1/site-packages/bsddb3Storage/Full.py", line 272, in _finish
    self._refcounts.put(roid, refcount, txn=txn)
bsddb3._db.DBNoMemoryError: (12, 'Not enough space -- Lock table is out of available locks')

To someone who understands BerkeleyDB, the error probably
makes lots of sense. But I'm not sure what is running
out of space / locks and what exactly should be done
to increase the amount of space / locks.

Thanks,

--andy.