niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » Berkeley DB
Db::get() hangup
Post new topic   Reply to topic Page 1 of 1 [6 Posts] View previous topic :: View next topic
Author Message
Florian Weimer
*nix forums Guru


Joined: 19 Feb 2005
Posts: 418

PostPosted: Sat Jun 24, 2006 2:24 pm    Post subject: Re: Db::get() hangup Reply with quote

* Mykola Stryebkov:

Quote:
During concurrent access to the database, deadlocks may occur. You
need to handle them in some way. The Berkeley DB reference guide
contains detailed information:

http://www.sleepycat.com/docs/ref/transapp/deadlock.html

Thanks, I know about deadlocks nature but very new in concurrent BDB
handling. What whould you say about using db_deadlock utility for
resolving occured deadlocks? I'm thinking about use it with -t flag.

My databases have little contention, so I call DB_ENV->set_lk_detect
and use the internal deadlock detector which runs every time a lock
cannot be obtained.

In an environment with more substantial log contention, using a
separate lock detector thread (or the command line utility, but I try
to make my applications self-contained) is perhaps the better choice.
Back to top
Mykola Stryebkov
*nix forums beginner


Joined: 16 Jun 2006
Posts: 3

PostPosted: Sat Jun 17, 2006 12:32 pm    Post subject: Re: Db::get() hangup Reply with quote

Florian Weimer wrote:
Quote:
* Mykola Stryebkov:

Florian Weimer wrote:
* Mykola Stryebkov:

What am i doing wrong?

Have you enabled the deadlock detector?

No. What's this?

During concurrent access to the database, deadlocks may occur. You
need to handle them in some way. The Berkeley DB reference guide
contains detailed information:

http://www.sleepycat.com/docs/ref/transapp/deadlock.html

Thanks, I know about deadlocks nature but very new in concurrent BDB
handling. What whould you say about using db_deadlock utility for
resolving occured deadlocks? I'm thinking about use it with -t flag.
Back to top
Florian Weimer
*nix forums Guru


Joined: 19 Feb 2005
Posts: 418

PostPosted: Sat Jun 17, 2006 11:05 am    Post subject: Re: Db::get() hangup Reply with quote

* Mykola Stryebkov:

Quote:
Florian Weimer wrote:
* Mykola Stryebkov:

What am i doing wrong?

Have you enabled the deadlock detector?

No. What's this?

During concurrent access to the database, deadlocks may occur. You
need to handle them in some way. The Berkeley DB reference guide
contains detailed information:

<http://www.sleepycat.com/docs/ref/transapp/deadlock.html>
Back to top
Mykola Stryebkov
*nix forums beginner


Joined: 16 Jun 2006
Posts: 3

PostPosted: Sat Jun 17, 2006 10:19 am    Post subject: Re: Db::get() hangup Reply with quote

Florian Weimer wrote:
Quote:
* Mykola Stryebkov:

What am i doing wrong?

Have you enabled the deadlock detector?

No. What's this?
Back to top
Florian Weimer
*nix forums Guru


Joined: 19 Feb 2005
Posts: 418

PostPosted: Sat Jun 17, 2006 7:25 am    Post subject: Re: Db::get() hangup Reply with quote

* Mykola Stryebkov:

Quote:
What am i doing wrong?

Have you enabled the deadlock detector?
Back to top
Mykola Stryebkov
*nix forums beginner


Joined: 16 Jun 2006
Posts: 3

PostPosted: Fri Jun 16, 2006 11:40 pm    Post subject: Db::get() hangup Reply with quote

Good evening, gentelmen.

I have one database simultaneously accessed by few processes. All of
them are performing reading/writing. After some time all working
processes are hunging up on Db::get(). db_stat-4.2 -h /path/to/home -d
database hangs up too, but the same command w/o -h key works properly.

I'm absolutely sure, that problem is in my misunderstanding or misuse
of environment. I'm always opening it with following flags: DB_CREATE |
DB_INIT_LOCK | DB_INIT_MPOOL | DB_INIT_LOG | DB_INIT_TXN. Typical
database open command is following:

db = new Db(&__env, 0);
db->open(0, name.c_str(), 0, DB_RECNO, flags, 0);

where flags are DB_CREATE or 0. Following operation hangs:

db->get(0, &key, &data, 0);

.... in all processes that are using this db home.

What am i doing wrong?
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [6 Posts] View previous topic :: View next topic
The time now is Fri Nov 21, 2008 6:14 am | All times are GMT
navigation Forum index » Databases » Berkeley DB
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Hangup Robert Rappaport Slackware 6 Sun Jun 11, 2006 10:15 pm
No new posts How to hangup from normal user. Newbie OpenBSD 1 Tue Jan 10, 2006 4:36 pm
No new posts net-ssh-w32perl stdout hangup problem Guest Perl 0 Tue Apr 19, 2005 6:39 pm
No new posts Hangup modem from another phone J Smith networking 2 Fri Mar 04, 2005 1:34 pm
No new posts NFS server hangup Graham Allan Tru64 managers mail-list 2 Wed Dec 31, 2003 8:30 pm

Mortgage | Outsourcing | Loans | Payday Loan | Secured Loans
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.2406s ][ Queries: 20 (0.1603s) ][ GZIP on - Debug on ]