-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Overview
A simple application, when the query is executed continuously, the application collapses and exits after repeated cycles.
//program code begin
var oracledb = require('oracledb');
oracledb.autoCommit = true;
function doRelease(connection) {
connection.close(
function(err) {
if (err)
console.log("1",err.message);
});
}
let query = function (sql, params, callback) {
oracledb.getConnection( // gets a connection from the 'default' connection pool
{
user: "bd_lbs",
password: "bd_lbs",
connectString:"127.0.0.1:1521/orcl"
},
function (err, connection) {
if (err) {
if (typeof callback == 'function')
callback(err, null);
return;
}
connection.execute(sql, params,
function (err, result) {
if (err) {
if (typeof callback == 'function')
callback(err, null);
doRelease(connection);
return;
}
if (typeof callback == 'function')
callback(err, result.rows);
doRelease(connection);
});
});
}
let getMyMessage = function (userid,callback) {
let sql = "select * from aa" ; //any table
let para = []
query(sql,para,(err,rows)=>{
if(err){
if (typeof callback == 'function')
callback(err,null);
return;
}
if(rows.length>0)
{
if (typeof callback == 'function')
callback(err,rows);
}
else
{
if (typeof callback == 'function')
callback("err",null);
}
})
}
let t = 1
setInterval(()=>{
getMyMessage(52)
getMyMessage(52) //Key Point
console.log(t)
t++
//-------------------------
},100)
//code end
//log :After 200 cycles,Process finished with exit code -1073740791 (0xC0000409)
Answer the following questions:
What is your Node.js version? Is it 64-bit or 32-bit? Run version.js from
Nodejs v10.5.0 or v8.9, 64-bit.
What is your node-oracledb version?
v2.3.0
What is your Oracle client (e.g. Instant Client) version? Is it 64-bit or 32-bit? How was it installed? Where is it installed?
12.2.0.1.0-1, 64-bit, installed from windows oracle12C,windows install
What is your Oracle Database version?
Oracle Database 12c - 64bit or Oracel Database 10.0.2
What is your OS and version?
windows10 64bit or windows2008 64bit
What is your compiler version? For example, with GCC, run gcc --version
4.9.2
What Oracle environment variables did you set? How exactly did you set them?
PATH=D:\oracle\product\12.2.0\dbhome_1\bin, my oracle database is on localhost side.
What is the PATH environment variable (on Windows) or LD_LIBRARY_PATH (on Linux) set to? On macOS, what is in ~/lib?
PATH=D:\oracle\product\12.2.0\dbhome_1\bin
What exact command caused the problem (e.g. what command did you try to install with)? Who were you logged in as?
in nodejs script
What error(s) you are seeing?
Process finished with exit code -1073740791 (0xC0000409)