0

I have a nodejs/express setup with front end routes & a breejs running scheduled tasks every X seconds. One of the tasks connects to an Oracle database (11g Express Edition on a Windows 7 machine), then executes a certain query.

Example code:

const executeOracleQuery = async (sqlQuery, params) => {
  // Create connection
  try {
    const oracledb = require('oracledb');
    const conn = await oracledb.getConnection({
        user: params.user,
        password: params.password,
        connectString: `${params.host}:${params.port}/${params.database}`
    })
  } catch (error) {
    console.log(error.stack);
  }
  
  // Execute my query
  try {
    let data = await conn.execute(sqlQuery);
    await conn.close();
    return data;
  } catch (error) {
    console.log(error.stack);
  }
}

After a number of executions, my server always crashes (even with the try/catch) and I get the following error:

ORA-24550: signal received: Unhandled exception: Code=c0000005 Flags=0

Followed by:

Encountered exception while getting args for function:0x00007FFBE5937056
Encountered exception while getting args for function:0x00007FF7C9A98260
kpedbg_dmp_stack()+377<-kpeDbgCrash()+129<-kpeDbgSignalHandler()+125<-skgesig_Win_UnhandledExceptionFilter()+158<-0x00007FFBE19E53AC<-0x00007FFBE5937100<-0x00007FFBE591F306<-0x00007FFBE59335AF<-0x00007FFBE5894AAF<-0x00007FFBE593231E<-0x00007FF7CA403CF8<-0x00007FF7C9B7BFC2<-0x00007FF7C9BAE935<-0x00007FF7C9B9EFE8<-0x00007FF7C9BAF0BF<-0x00007FF7C9BD14F8<-0x00007FF7C9A94DA9<-0x00007FF7C9A99A78<-0x00007FF7C9A95368<-0x00007FF7C9BF49AD<-0x00007FF7CA9C0F30<-0x00007FFBE3587E94<-0x00007FFBE58F7AD1

How do I catch and log the error?

EDIT:

usersina
  • 1,063
  • 11
  • 28

1 Answers1

1

Updating the node-oracledb package to v5.2 fixes the issue.

usersina
  • 1,063
  • 11
  • 28