berkeley db read locks not getting released
826072Dec 22 2010 — edited Feb 17 2011I've a berkeley db database on which mostly READ operations are done is consuming locks. Here is the db_stat output.
4077 Last allocated locker ID.
2147M Current maximum unused locker ID.
9 Number of lock modes.
5000 Maximum number of locks possible.
5000 Maximum number of lockers possible.
5000 Maximum number of lock objects possible.
3894 Number of current locks.
3898 Maximum number of locks at any one time.
4018 Number of current lockers.
4019 Maximum number of lockers at any one time.
3 Number of current lock objects.
25 Maximum number of lock objects at any one time.
262M Total number of locks requested.
262M Total number of locks released.
0 Total number of lock requests failing because DB_LOCK_NOWAIT was set.
95 Total number of locks not immediately available due to conflicts.
0 Number of deadlocks.
0 Lock timeout value.
0 Number of locks that have timed out.
0 Transaction timeout value.
0 Number of transactions that have timed out.
2MB The size of the lock region..
11583 The number of region locks granted after waiting.
354M The number of region locks granted without waiting.
Looking at the locks, I see that all the locks are "READ" locks of the form below. Also, there is no transaction or cursor involved. These locks are not getting released even when the system is idle. In what circumstances, the berkeley db will not release the db READ locks HELD? Could this be a bug in the berkeley db? The version we are using is Berkeley DB 4.2.52.
Locker Mode Count Status ----------------- Object ---------------
52 READ 1 HELD /var/opt/mydb.dbpage 25
57 READ 1 HELD /var/opt/mydb.dbpage 25
Thanks