Menu

#161 Use of archive DB seems broken in "karen" release

BASE
closed-fixed
Database (41)
5
2007-06-20
2007-02-01
Anonymous
No

BASE works fine when using only a production DB. When an additional archive DB is added, no alerts are shown anymore (neither in archive nor in production view) but the notes with the count of newly added alerts are shown correctly.

m.stiefenhofer@ecofis.de

Discussion

  • Kevin Johnson

    Kevin Johnson - 2007-02-23

    Logged In: YES
    user_id=836228
    Originator: NO

    I can not reproduce this?

     
  • Stephen Sadowski

    Logged In: YES
    user_id=1729439
    Originator: NO

    It is also broken in the 1.3.5 (marie) release.

    Our working theory is that this only becomes apparent when the number of sensors increases.

    There is a memory leak created in includes/base_cache.inc.php

    if ( ($archive_exists == 1) && (@$_COOKIE['archive'] != 1) ) {
    $db2 = NewBASEDBConnection($DBlib_path, $DBtype);
    $db2->baseConnect($archive_dbname, $archive_host, $archive_port,
    $archive_user, $archive_password);
    $archive_ccid_lst = $db2->baseExecute("SELECT MAX(cid) FROM acid_event WHERE sid='".$sid."'");
    $archive_ccid_row = $archive_ccid_lst->baseFetchRow();
    $archive_ccid = $archive_ccid_row[0];
    if ( $archive_ccid == NULL ) $archive_ccid = 0;
    } else {
    $archive_ccid = 0;
    }

    the fix is

    478,479d477
    < $archive_ccid_lst->baseFreeRows();
    < $db2->baseClose();

     
  • Kevin Johnson

    Kevin Johnson - 2007-06-20
    • assigned_to: nobody --> secureideas
    • status: open --> closed-fixed
     
  • Kevin Johnson

    Kevin Johnson - 2007-06-20

    Logged In: YES
    user_id=836228
    Originator: NO

    Checked in recommended fix. See next release
    Kevin