Frequently Asked Questions

What's this Lock table is out of available object entries all about?

Freeze, the Ice persistence service, stores all its data in local files using the Berkeley DB database management system. For many applications using Freeze, Berkeley DB requires no configuration at all; the default settings are sufficient. This error message and other similar Berkeley DB error messages indicate that your application requires additional Berkeley DB configuration; sometimes, such errors can also be the result of a bug in your program (for example, if you forgot to terminate a transaction).

In order to configure Berkeley DB, you need to create a file named DB_CONFIG in your Freeze database home directory (see Freeze.DbEnv.envname.DbHome). The lock table error means you need to change the configuration of the Berkeley DB locking subsystem, as described in this Berkeley DB reference page. For example, you could add the following to your DB_CONFIG file:

# Increase the number of locks and lock objects; the default for both is 1000
set_lk_max_locks 10000
set_lk_max_objects 10000

Understanding the Berkeley DB configuration may require some insights into the Freeze implementation—how Freeze objects map to Berkeley DB objects. The table below summarizes this mapping:

Freeze Berkeley DB Notes
Environment Environment
Transaction Transaction
Iterator Cursor Java iterators and non-const C++ iterators outside a transaction also hold their own private transaction
Map B-tree database
Entry in a Map Entry in the associated database
Map Index B-tree database configured as secondary index
Evictor One B-tree database per facet All the databases of a given Evictor are stored in the same physical file. Updates are written by a background thread, controlled with Freeze.Evictor.envname.filename.SavePeriod and Freeze.Evictor.envname.filename.SaveSizeTrigger.
Servant stored in an Evictor Entry in the associated database
Evictor Iterator One cursor created and destroyed for each retrieval See batchSize parameter of Freeze::Evictor::getIterator.

For almost all Berkeley DB settings (for example the environment cache size), Freeze does not substitute its own default value for Berkeley DB's default value. The only exceptions are:

Copyright © 2008 ZeroC, Inc.