Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

lock conflicts

541788Oct 25 2006 — edited Dec 10 2006
I'm quite a newbie when it comes to using Berkeley DB. I am using BDB
dbxml.

I have an application that fetches data from an external source and
writes that into dbxml. The data fetch takes a long time, so I start a
new thread to do this. All writes into dbxml for that batch are then
done in that same new thread.

When I have a few batches running at the same time, after variable
amounts of time, the application will hang. When this happens my only
option is to run db_recover.

The problem happens when I have more than one of these: multiple writes
in multiple threads. I am protecting everything with transactions, but
am getting lock conflicts.

The output of db_stat -CA includes this:

1 Total number of locks not immediately available due to
conflicts

80000275 READ 28 HELD RefData page
3105
80000275 WRITE 55 HELD RefData page
3105
80000276 READ 1 WAIT RefData page
3105

Unfortunately, I don't know how to interpret this. How do I tell where
the conflict is happening? What sort of pattern should I be following
to prevent this from happening?

I don't know what information would help make the above clearer, but am happy to provide more.

Many thanks,

PC
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 7 2007
Added on Oct 25 2006
21 comments
1,922 views