1 Reply Latest reply: Jun 13, 2011 4:20 PM by Bogdan Coman-Oracle RSS

    db_associate fails with : Lock table is out of available lock entries


      Occasionally on startup my app needs to rebuild its secondary database, so I call db_associate with DB_CREATE set. If the primary db is large the associate fails with "Lock table is out of available lock entries". Both databases are hashes, so I have not configured any special lock sizes as I didn't think I needed to.

      What lock configuration does db_associate need to succeed?

      I am using version 4.7.25

        • 1. Re: db_associate fails with : Lock table is out of available lock entries
          Bogdan Coman-Oracle
          Hi Ashley,

          You should be sizing the locking subsystem with high enough values so the secondary database rebuilds successfully, then run the "db_stat -C" utility and see how many locks, lock objects and lockers did you need to perform the operation and reconfigure the locking subsystem with values slightly bigger than what you needed, so you make sure that you'll have enough resources for the next time you'll rebuild the secondary.

          "Lock table is out of available lock entries" means that the Berkeley DB locking subsystem has not been configured for enough locks. For more information, see the "Configuring locking: sizing the system" section of the Berkeley DB Reference Guide, included in your download package and also available at:

          To see what locks are held in the database environment at any time, you can dump the lock table using the -Cl options:

          % db_stat -h [database environment directory] -Cl -N

          Additional documentation:
          db_stat: http://download.oracle.com/docs/cd/E17076_02/html/api_reference/C/db_stat.html
          set_lk_max_locks: http://download.oracle.com/docs/cd/E17076_01/html/api_reference/C/envset_lk_max_locks.html

          Bogdan Coman