Here's the Berkeley DB tutorial for anyone who might want to do some reading on sizing your database correctly and lock limits.
http://www.stanford.edu/class/cs276a/projects/docs/berkeleydb/ref/lock/max.htmlThe maximum number of locks required by an application cannot be easily estimated. It is possible to calculate a maximum number of locks by multiplying the maximum number of lockers, times the maximum number of lock objects, times two (two for the two possible lock modes for each object, read and write). However, this is a pessimal value, and real applications are unlikely to actually need that many locks. Reviewing the Lock subsystem statistics is the best way to determine this value.