DB_PAGE_NOTFOUND

hello, I have a single threaded application with Bdb flags : DB_INIT_MPOOL,  DB_INIT_TXN, DB_INIT_LOCK ... I take backups through the API call env->backup .. Yet the backup taken sometimes fails  with the DB_PAGE_NOTFOUND

I am afraid I can not provide a reproducer program as the problem happens occasionally and not persistently, But the scenario is that the app closes the env to make sure all the updated are written to the db, reopens it and then calls env->backup ... Attempting to iterate on the data in the some of the taken backups fails with the given error at a get operation, while other backups work perfectly
Thank you

Similar Messages

  • Frequent but unpredictable DB_PAGE_NOTFOUND corruption

    Hi,
    We have developed a multi-process data processing engine that uses BDB as state storage to store queues of pointers to datums in on-disk flat files. The engine is written in Perl, using the standard BerkeleyDB CPAN module as its interface to BDB.
    Platform: Red Hat Enterprise Linux 5.1 x86-64
    Perl: 5.8.8 (with 64-bit support)
    BDB: 4.3.29 (the default for this version of RHEL)
    After running in production for some time without any errors, occasionally one of the data queues (a Btree database) has started to corrupt after a few hours of record creation/deletion by forked children. The error (which is elicited after subsequent db_put() calls is "DB_PAGE_NOTFOUND: Requested page not found"), and running db_verify on the database returns:
    "db_verify: Page 1: internal page is empty and should not be
    db_verify: queue.db: DB_VERIFY_BAD: Database verification failed"
    Worse, is that the error cannot be recreated on any of our development or staging environments - it just intermittently occurs in production, now maybe every 3 to 8 hours.
    Some background:
    Roughly - the child processes that seem to be causing the corruption read a bunch of key/values via a cursor, and then delete the keys from the DB.
    The environment is created with: DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_THREAD | DB_INIT_TXN
    The database is created with: DB_CREATE|DB_THREAD
    The parent process closes all Env & DB handles before forking children, then re-opens upon returning from fork().
    The child processes all open their own Env & DB handles after fork().
    There are usually around 5-8 children running in parallel, and will execute the deletes on the DB in parallel.
    Before exiting, the child processes always explicitly call db_sync() before calling db_close() - probably overkill.
    Here's where my understanding of deadlocking in BDB gets shaky:
    DB_INIT_LOCK should implement multiple-writer locking semantics, and because of the way the parent process distributes the work to the child processes, children are never competing to delete the same keys.
    I suspect the reason for the corruption is that BDB's locking may be page-based, not key (record) based, and if (say) child A deleting a key causes an underlying page split (?) whilst child B is also deleting a key stored on that same page, corruption occurs. Am I on the right track here? The app is not yet doing any deadlock detection or resolution - we haven't yet gone down that route because nowhere are any errors regarding deadlocks being surfaced in the statuses of any DB calls, or the output of db_stat().
    Interestingly, none of the db_del() calls in any of children fail, with deadlock errors or otherwise - the corruption is only noticed by calls to db_put() into the same database during a subsequent processing run - obviously after the in-memory cache has been synced to disk.
    We haven't yet gone for upgrading BDB to 4.7 (or even 4.4) , but will attempt to do this if no other fix is forthcoming.
    An alternative, quicker fix we're trying out is to use DB_INIT_CDB to enforce single-writer semantics on the children, or to move the responsibility of writing back up to the parent process, and have no multiple-writers at all.
    I know my understanding of the pitfalls of deadlocking and how they relate to the underlying Btree store aren't great and suspect herein lies the real problem. Many thanks in advance for anyone with advice or recommendations here.

    Thanks Michael. I'll engage here for the sake of Googlers and also follow up by email.
    - Yes, the same flags are used to open the environments and db in the children; all processes use the same storage class that wraps the BDB access.
    - db_sync() before db_close() was paranoia on my part - noted and understood that it's unnecessary.
    - The db_verify output is indeed all it reports. <tt>db_dump -qa queue.db</tt> on a corrupt DB reports:
    <tt>
    In-memory DB structure:
    btree: 0x120200 (duplicates, open called, read-only)
    bt_meta: 0 bt_root: 1
    bt_maxkey: 0 bt_minkey: 2
    bt_compare: 0x30b2222900 bt_prefix: 0x30b2222970
    bt_lpgno: 0
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    page 0: btree metadata level: 0 (lsn.file: 0 lsn.offset: 1)
    magic: 0x53162
    version: 9
    pagesize: 8192
    type: 9
    keys: 0 records: 0
    free list: 2, 0
    last_pgno: 2
    flags: 0x1 (duplicates)
    uid: 5f 0 db 4 0 fd 0 0 1b d6 75 51 bf 5c 0 0 0 0 0 0
    maxkey: 0 minkey: 2
    root: 1
    page 1: btree internal level: 2 records: 0 (lsn.file: 0 lsn.offset: 1)
    entries: 0 offset: 8192
    page 2: invalid level: 0 (lsn.file: 0 lsn.offset: 1)
    prev: 0 next: 0 entries: 0 offset: 8192
    </tt>
    There are records in the queue.db, though - viewing it reveals recognisable keys.
    Other things I ought to mention, which may be giveaways:
    - Although creating the environment with DB_INIT_TXN, the app does not perform any transaction handling or checkpointing - in effect it is in auto-commit mode.
    - Since modifying the storage to use DB_INIT_CDB overnight, there has been (so far!) no corruption.
    Thanks again.

  • BDB0075 DB_PAGE_NOTFOUND: Requested page not found

    Hello,
    If I create a primary and a secondary database within the same BDB database file,
    BDB fails with "BDB0075 DB_PAGE_NOTFOUND: Requested page not found". This
    happens if the secondary database returns more values (DB_DBT_MULTIPLE).
    Down below a testcase. The callback simply creates ngrams, e.g.:
    ABCDEFG -> ABC BCD CDE DEF EFG
    BDB version: 5.2.28 (most recent), Ubuntu 11.04
    Thanks a lot
    Josef
    #include <stdio.h>
    #include <malloc.h>
    #include <string.h>
    #include <db.h>
    #define DATABASE "/tmp/db.db"
    static int callback_ngram( DB *secondary, const DBT *key, const DBT *data, DBT *result );
    int main(int argc, char *argv[])
        unlink( DATABASE );
        // Open database with a secondary index
        DB *primary;
        for( int i=0; i < 2; ++i )
            DB *handle = NULL;
            int status = db_create( &handle, NULL, 0 );
            if( status != 0 )
                return 1;
            handle->set_lorder( handle, 1234 );
            if( i != 0 )
                handle->set_flags( handle, DB_DUP | DB_DUPSORT );
            handle->set_msgfile( handle, stderr );
            handle->set_errfile( handle, stderr );
            // Open database, name is "0" and "1"
            char dbname[32];
            sprintf(dbname, "%d", i);
            status = handle->open( handle, NULL, DATABASE, dbname, DB_BTREE, DB_CREATE, 0644 );
            if( status != 0 )
                return 1;
            // Associate
            if( i == 0 )
                primary = handle;
            else
                primary->associate( primary, NULL, handle, callback_ngram, DB_CREATE );
        // Insert records
        for( unsigned i=0; i < 100000; ++i )
            char buffer[10];
            for( unsigned j=0; j < sizeof(buffer); ++j )
                buffer[j] = 'A' + (((i + 1) * (j + 1)) % 26);
            //printf("%c%c%c%c%c%c%c%c%c%c\n", buffer[0], buffer[1], buffer[2], buffer[3], buffer[4],
            //                                 buffer[5], buffer[6], buffer[7], buffer[8], buffer[9] );
            // put record
            DBT key;
            memset( &key, 0, sizeof(DBT) );
            key.data = &i;
            key.size = sizeof(i);
            DBT data;
            memset( &data, 0, sizeof(DBT) );
            data.data = buffer;
            data.size = sizeof(buffer);
            int status = primary->put( primary, NULL, &key, &data, 0 );
            if( status == 0 )
                continue;
            fprintf(stderr, "Put failed: %s\n", db_strerror(status));
            return 1;
        return 0;
    static int callback_ngram( DB *secondary, const DBT *key, const DBT *data, DBT *result )
        int ngrams = data->size - 2;
        result->data = malloc( sizeof(DBT) * ngrams );
        result->size = ngrams;
        result->flags = DB_DBT_MULTIPLE | DB_DBT_APPMALLOC;
        for( int i=0; i < ngrams; ++i )
            DBT *item = ((DBT*)result->data) + i;
            item->data = ((char*)data->data) + i;
            item->size = 3;
            item->flags = 0;
        return 0;
    }

    Hello Josef,
    I just tried your test case exactly as it (with the addition of printing "done" at the end) on 5.2.28
    RHEL and no error is raised:
    ./test
    done
    Do I need to do something else to see the error?
    Thank you,
    Sandra

  • DB_PAGE_NOTFOUND error after recovery on a CDS database

    I am getting a DB_PAGE_NOTFOUND error after recovery, with a database that is configured in CDS mode. The error occurs after I insert several rows, bring down the process, remove the environment files and start the process which attempts to insert additional rows - gets a DB_PAGE_NOTFOUND error. The error persists ie. terminating and starting a new oprocess does not resolve the problem.
    Amy help will be appreciated.

    Assuming, that the db is corrupted and that CDS db's can get corrupted - is there any way, I can reduce the frequency of these errors by increasing Cache, page size etc.?
    Following is my DB configuration:
                   dbEnv_->open(envHome_.c_str(), envFlags_, 0);
                    dbEnv_->set_errpfx(envHome_.c_str());
                    dbEnv_->set_thread_count(16);
                    dbEnv_->set_cachesize(0,(100*1024*1024),2);
                    envFlags_ =   DB_INIT_CDB | DB_THREAD | DB_INIT_MPOOL ;
                    envFlags_ |=  DB_CREATE ;
                    dbEnv_->open(envHome_.c_str(), envFlags_, 0);
    db->set_pagesize((32*1024));
                db->open(NULL, temp.c_str(), tableName.c_str(),\
                    DB_BTREE, DB_CREATE | DB_THREAD , S_IRUSR | S_IWUSR);
                    dbEnv_->open(envHome_.c_str(), envFlags_, 0);
    The platform is HPUX. The problems occurs periodically - i.e. not every time.
    Thanks for your help.

  • DB_RUNRECOVERY or DB_PAGE_NOTFOUND

        i'm using the bdb 4.5.20.i found after plenty of call the "put" and "delete" operation and "sync"  operation with program crush,when reload the database file and call the "delete" operation,i will get the
    DB_RUNRECOVERY OR DB_PAGE_NOTFOUND error.how can i fix this bug?

    So we can better understand what us going on, please describe your use case better.  What are you doing with BDB?   Also, can you provide a test case that we can use to reproduce the problem?    Both of those are error messages being reported.  
    thanks
    mike

  • DB_PAGE_NOTFOUND given when do db_dump

    Hi.
    I'm going to do some development on my Motolora E680i cellphone which has a linux on it. I crosscompile BDB4.5.20NC and run db_dump to see the database on my cellphone. But when I type db_dump -p native.db, an error reported:
    #db_dump: DBcursor->get: DB_PAGE_NOTFOUND: Requested page not found
    I copied the native.db to my windows computer, and used windows version db_dump, all infomation was given normally.
    When I try to use Db::open to open one of the databases in the native.db file on my cellphone, the same error message is given. So who can tell me what's happend?

    here's the codes, I will try the DB_INIT_LOCK
    int CEmsDoc::ConnectDB()
    int ret = RET_OK;
    m_pdb = new Db( NULL, DB_CXX_NO_EXCEPTIONS );
    if( NULL == m_pdb )
    TRACELOG("new Db failed");
    goto CLEANUP;
    if ( m_pErrFile )
    m_pdb->set_error_stream( m_pErrFile );
    ret = m_pdb->open( NULL, "/ezxlocal/sysDatabase/native.db", "ems_table_in_flash", DB_UNKNOWN, DB_RDONLY, 0);
    if ( ret )
    TRACE( "db open faild at line %i in %s" );
    goto CLEANUP;
    ret = m_pdb->cursor( NULL, &m_pdbcCursor, DB_TXN_SNAPSHOT );
    if ( ret )
    TRACE( "cursor failed at line %i in %s" );
    goto CLEANUP;
    CLEANUP:
    if ( ret )
    DisConnectDB();
    return ret;
    and I have tried this:
    m_pDbEnv = new DbEnv( DB_CXX_NO_EXCEPTIONS );
    m_pDbEnv->open( ""/ezxlocal/sysDatabase", DB_INIT_CDB|DB_INIT_MPOOL, 0 );
    m_pdb->open( m_pDbEnv, native.db", "ems_table_in_flash", DB_UNKNOWN, DB_RDONLY, 0);
    It returns No such file or dirctory when open DBEnv, but I'm sure the path and filename and the dbname are right.
    BTW, am I right to cross compile bdb like this:
    first I add this at the begining of dist/configure
    #my crosscompiler named arm-linux-...
    CC=arm-linux-gcc
    CXX=arm-linux-g++
    AR=arm-linux-ar
    RANLIB=arm-linux-ranlib
    STRIP=arm-linux-strip
    then under build_unix:
    ../dist/configure host=arm-linux perfix=/opt/bdb --enable-cxx
    make
    make install
    null

  • Getting a -30987 (DB_PAGE_NOTFOUND) after using struct as data in the C API

    Hi,
    I'm using the Berkeley DB on my Ubuntu for some time now. Today, I've spend several hours on the following problem:
    My function for writing in the DB looks like that:
    - I've written the following code for writing in the db:
    +==========+
    +int write_entry(char argv_entry, char main_header){+
    +typedef struct write_entry {+
    +char *header;+
    +char *entry;+
    +} WRITE_ENTRY;+
    u_int32_t flags;
    int ret;
    DBT key, data;
    +DB *blog_db;+
    WRITE_ENTRY my_entry;
    int buffsize, bufflen;
    +char *databuff;+
    +/* === Open DB */+
    ret = db_create (&blog_db, NULL, 0);
    +if (ret != 0){ printf(":( - ERROR while db_create\n"); }+
    flags = DB_CREATE;
    ret = blog_db->open(blog_db, NULL, "blog.db", NULL, DB_BTREE, flags, 0);
    +if (ret != 0){printf("ERROR\n"); }+
    +/* === declaring vars and mem */+
    unsigned long my_key;
    my_key = time (NULL);
    my_entry.header = main_header;
    my_entry.entry = argv_entry;
    buffsize = (strlen (my_entry.header) strlen (my_entry.entry) + 2);+
    databuff = malloc (buffsize);
    memset(databuff, 0, buffsize);
    memcpy (databuff, my_entry.header, strlen (my_entry.header));
    bufflen = strlen (my_entry.header) 1;+
    memcpy (databuff bufflen, my_entry.entry, strlen (my_entry.entry));+
    bufflen = strlen (my_entry.entry) + 1;+
    +/* rdy to store */+
    memset (&key, 0, sizeof(DBT));
    memset (&data, 0, sizeof(DBT));
    key.data = &(my_key);
    key.size = sizeof(unsigned long);
    data.data = databuff;
    data.size = bufflen;
    ret = blog_db->put(blog_db, NULL, &key, &data, DB_NOOVERWRITE);
    free(databuff);
    +if(ret == 0) { return 0; }+
    +else { return (ret); }+
    +if (blog_db != NULL){+
    blog_db->close(blog_db, 0);
    +}+
    +}+
    +==========+
    I use the following code to receive data from the DB:
    +==========+
    +void main(){+
    write_entry ();
    +}+
    +write_entry(){+
    +typedef struct write_entry {+
    +char *header;+
    +char *entry;+
    +} WRITE_ENTRY;+
    int id;
    DBT key, data;
    +DB *my_blog;+
    WRITE_ENTRY my_entry;
    u_int32_t flags;
    int ret;
    ret = db_create (&my_blog, NULL, 0);
    flags = DB_CREATE;
    ret = my_blog->open(my_blog, NULL, "blog.db", NULL, DB_BTREE, flags, 0 );
    memset (&key, 0, sizeof(DBT));
    memset (&data, 0, sizeof(DBT));
    id = 1288563852;
    key.data = &id;
    key.size = sizeof (unsigned long);
    ret = my_blog->get(my_blog, NULL, &key, &data, 0);
    if (ret != 0)
    +{+
    printf("RET != 0 ==> %d\n", ret);
    +}+
    printf("Output: %s", data.data);
    +}+
    +==========+
    Whatever I do - I get a "-30987" after the following line:
    ret = my_blog->get(my_blog, NULL, &key, &data, 0);
    I also tried to replace the long variable with an int - same result.
    Could anybody tell me, what's going wring here?
    Greetings
    Jan

    Hello,
    We do not have all the details here i.e. product (DS, CDS, TDS, HA),
    if the application is multi-process/multi-threaded, if transactions/
    environment/locking are in use, BDB version, but a few suggestions would
    be:
    1. make sure that there are no environment/database corruptions
    2. if applicable make sure that any log/region files are not corrupted.
    3. ensure that the same database is not updated both from within
    an environment and outside the environment
    4. make sure any cursors are closed when the application is finished
    with them.
    5. ensure that the same database is not accessed from within and without
    a transaction
    6. check if any processes/threads have been killed unexpected?
    Since the application is long-running and you just hit this problem,
    some type of corruption could have occurred.
    Thanks,
    Sandra

  • DB_HEAP access method with db_hotbackup utility

    I open a Db handle with DB_HEAP access method and do nothing about it . When first created , the db file is 8kb , but after excuting db_hotbackup utility the db file is 4kb. if I do db_hotbackup under the failover environment , BDB give me an error message :
         db_hotbackup: Backup Failed: BDB0075 DB_PAGE_NOTFOUND: Requested page not found
         db_hotbackup: BDB5043 HOT BACKUP FAILED!
    Other access method is ok . I try to set the Db pagesize 8kb but still wrong .
    I think a db file is bigger than a page size. So it's hard to understand.
    Thanks

    Sorry about mix the two problems. Let me make it clearly :
    1 .Create an Environment contains an empty DB_HEAP database file with the code below.
         1.1 compile the code and mkdir "fileHome" for Environment direcotory,
         1.2 execute the program
    2. execute { db_hotbackup -h ./fileHome -b ./failover } . and in failover directory the database file will  become smaller than it in Environment direcotry.
    3. chang code { const char* fileHome = "fileHome"; } to { const char* fileHome = "failover"; }
    4. compile the changed code and execute again.( for creating region files in the failover directory)
    5. execute { db_hotbackup -h ./failover -b ./failover_back } after this we can see the wrong message :
               db_hotbackup: Backup Failed: BDB0075 DB_PAGE_NOTFOUND: Requested page not found
               db_hotbackup: BDB5043 HOT BACKUP FAILED!
    The problem I said on the previous time is I try to insert some record to the database but failed. I just wonder if this BDB version is not supportint DB_HEAP access method.
    The code is :
    #include<iostream>
    #include<cstring>
    #include<cstdlib>
    #include"db_cxx.h"
    int main()
      u_int32_t env_flags = DB_CREATE |
           DB_INIT_LOCK |
           DB_INIT_LOG |
           DB_INIT_TXN |
           DB_INIT_MPOOL;
      u_int32_t db_flags = DB_CREATE | DB_AUTO_COMMIT;
      const char* fileHome = "fileHome";
      const char* filename = "simpletxn.db";
      Db *dbp = NULL;
      DbEnv myEnv(0);
      try{
      myEnv.open(fileHome,env_flags,0);
      dbp = new Db(&myEnv,0);
      dbp->set_pagesize(8 * 1024);
      dbp->open(0,
       filename,
       NULL,
       DB_HEAP,
       db_flags,
       0);
      }catch(DbException& e){
      std::cerr<<"error when opening environment and database: "<<filename<<","<<fileHome<<std::endl;
      std::cerr<<e.what()<<std::endl;
      try{
      if(dbp != NULL)
      dbp->close(0);
      myEnv.close(0);
      }catch(DbException& e){
      std::cerr<<"error when closing environment and database: "<<filename<<","<<fileHome<<std::endl;
      std::cerr<<e.what()<<std::endl;
      return 0;
    Thanks !!!

  • Strange error code returned!!!

    I have a bdb ,version 4.7.25 ,when i put lots of records (above 20,000,000) in it,each record is not bigger than 512 bytes,
    when i start my db,first i use DB_MPOOLFILE to read it,it's about 20401665 pages,then i use cursor to read detail records
    from this db,after 1,000,000 records was read,it complains about,DB_PAGE_NOTFOUND,but now the db_strerror returns SuccessFul!!!
    how can this happen???
    another question
    in this big db ,sometimes(not so often) ,when i use dbp->exists to check weather a record was exists in my db,
    it will return 34548 to me ,and db_strerror returns Unknown error!

    For information, we are using the batch file under EAS console directory of Essbase:
    \Hyperion\products\Essbase\eas\console\bin\CmdLnLauncher.bat
    @echo off
    set CPATH=..\lib\CmdLnLauncher.jar
    set CPATH=%CPATH%;..\lib\easclientplugin.jar
    set CPATH=%CPATH%;..\lib\log4j-1.2.8.jar
    set CPATH=%CPATH%;..\lib\framework_common.jar
    set CPATH=%CPATH%;..\lib\eas_common.jar
    set CPATH=%CPATH%;..\lib\jaxp-api.jar
    set CPATH=%CPATH%;..\lib\jdom.jar
    set CPATH=%CPATH%;..\lib\dom.jar
    set CPATH=%CPATH%;..\lib\xercesImpl.jar
    java -DHBR_HOME=..\.. -cp %CPATH% com.hyperion.hbr.cmdlnlauncher.CmdLineLauncher %1 %2 %3 %4 %5 %6

  • 2 Questions, maybe caused by page sizing?

    1. One of my DB, the size is near to 100mb, when I try to traverse it, the cursor goes to no.16162 record, and then stopped there, never move again. I think it maybe caused by page size. (I used default page size, I didn't set it myself). But I reckon that page size just can affect the performance, that means if I didn't use a proper page size, it could slow but not stop. right?
    2. Another DB file, just less than 5mb, when I try to traverse it using
    while(0 == (ret = Mapblock_cursorp->c_get(Mapblock_cursorp, &sKey, &sData, DB_NEXT)))
    the return value ret = -30987 (means:DB_PAGE_NOTFOUND: Requested page not found).
    I don't know why.
    By the way this DB's key structure is same as I have mentioned previously, in the
    http://forums.oracle.com/forums/thread.jspa?threadID=&tstart=0.
    But I don't think it caused by the complex structure, because I was just treaversing the db not searching it by any searchkey.

    Hi Lesslie,
    What flags are you using when you open the env and the databases?
    Can you please run db_verify on your database and let me know what the result is?
    Thanks,
    Bogdan Coman

  • 4.6.18/19 and chroot on unix environments

    Hello
    Looks like BDB is caching names (and paths) of it's databases somewhere (in cache files __db* probably). This started to happen with 4.6.18.
    This makes a problems when opening database, doing chroot() and making some operations on db.
    Is there a way to stop caching database paths in bdb 4.6 and get the same behaviour as it was in 4.5.20?
    Using db from inside and outside of chroot() makes nasty problems happen like DB_PAGE_NOTFOUND etc.

    The code I'm trying to get working is quite huge (rpm package manager) so I'll describe what I figured out for now.
    So suppose that you have directory where BDB database lives (db files + __db.XX files in the same directory):
    /level1/superdir/database/
    We open (dbenv->open()) that database, do something on it and close() but without calling remove(). So now we have nicely closed database but __db.XX files are still there.
    Now we chroot() into /level1/ and run our program again. Since we chrooted /level1/ is now our new root directory. BDB lives in /superdir/database/ now.
    So we open() /superdir/database/ and... BDB tries to open still old /level1/superdir/database/ path instead of just /superdir/database/ (after chroot path).
    BDB 4.5 was working without problems with such scheme. BDB 4.6 has problems with it.
    What can I do about that to get 4.5 behaviour back?
    Current bdb 4.6 behaviour means that location of database directory cannot be changed without requirement to rm __db.XXX files. BDB 4.5 behaviour was nicer.

  • Help me! java.lang.IllegalArgumentException: call on closed handle

    Java Edition 4.3.9
    Server : Linux/Resin-3.x
    1 : when underside error , Appliction not run.
    java.lang.IllegalArgumentException: call on closed handle
    at com.sleepycat.db.internal.db_javaJNI.Db_get(Native Method)
    at com.sleepycat.db.internal.Db.get(Db.java:264)
    at com.sleepycat.db.Database.get(Database.java:161)
    2 when underside error ,application can run,but some DB file not run.
    com.sleepycat.db.DatabaseException: DB_PAGE_NOTFOUND: Requested page not found:
    Note: the application intercurrent visitation count very high.
    db files frequency writer and read.
    Thanks.

    Hi,
    What was the line of code (api call) were you were running when you got this error?
    Was an exception generated (perhaps a deadlock?) just prioor to this?
    The error suggests you are trying to close a handle that was previously closed? Have you done any analysis on that? I'm wondering if you had an exception or an error and in your error handler you tried to close a resource that was already close.
    Whatever the operation is, (say a cursor for example) you could try something like the following:
    if (cursor != null)
    cursor.close();
    Ron

  • How to specify the DB_MPOOL_CREATE  flag?

    In berkeley docs it said the if the flag DB_MPOOL_CREATE is not specify than you might get DB_PAFGE_NOT_FOUND error. - i got this exception and i want to avoid getting it again. how and where can i specify the flag DB_MPOOL_CREATE ?

    Hi,
    What is the call that returns the DB_PAGE_NOTFOUND error? Is it a DB_MPOOLFILE->get() call or some other method call?
    I don't see why you would need to change anything in the source code. If the DB_PAGE_NOTFOUND error is returned when doing a DB_MPOOLFILE->get() call then you're trying to retrieve a database page that doesn't exist; if you're doing the call and specify the DB_MPOOL_CREATE flag you're instructing BDB to create that database page if it doesn't exist.
    If this error is returned by some other call, for example, when doing a get on a database either using the database handle or a cursor, then the database's integrity may have been affected. You can verify the database to see if it's consistent using either the db_verify utility or the DB->verify() method.
    Regards,
    Andrei

Maybe you are looking for