What does "Lock table is out of available object entries" mean?
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 (such as neglecting 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.env-name.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. When using a background-save Evictor, updates are written by a background thread, controlled with the properties |
Servant stored in an Evictor | Entry in the associated database | |
Evictor Iterator | One cursor created and destroyed for each retrieval | See |
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:
- the deadlock detection policy: Freeze uses a default value of
DB_LOCK_YOUNGEST
instead ofDB_LOCK_DEFAULT
. - the log file auto-removal: it is on by default in Freeze (see
Freeze.DbEnv.env-name.OldLogsAutoDelete
), and off by default in Berkeley DB.