5 Replies Latest reply: Jul 23, 2013 4:04 AM by c6ae0fc6-e0c3-494d-9a53-09f8ec293b5e RSS

    BDB maximum lock overflow problem



      I've a single threaded application which updates my Berkeley DB in a single transaction. My operations look like below:








      Inside this single thread of control, there can be huge number of db updates (there can be 5 million or even more updates).


      I had set the set_lk_max_lockers value in DB_CONFIG pretty high. But few times, the application was hit by "no more locks available" error.


      To overcome this, I set these values in DB_CONFIG pretty high. Now my DB_CONFIG values are as shown below:


      set_lk_max_locks   15000000

      set_lk_max_lockers 15000000

      set_lk_max_objects 15000000


      But with this the new problem is size of my one of the __db* files is huge (of the order of 8-10 GB).


      Now in this release I'm not planning to make my application multi threaded. The application will have single thread of control for BDB.

      Then do I've an option to set set_lk_max_locks* values to default and to open the db in exclusive lock mode using set_lk_exclusive() function?


      Kindly help me to figure out will the above setting solve my problems of maximum locks value and the resulting __db* file size?


      ~ Ashish K.