1

When using tedious-connection-pool the connection gets terminated after a specific time period when app is in ideal state. How to resolve this?

Referred https://github.com/tediousjs/tedious-connection-pool about how to process request using tedious-connection-pool.

var pool = new ConnectionPool(poolConfig, config);

pool.acquire(function (err, connection) {
    if (err) {
        console.error(err);
        return;
    }

    var request = new Request(sqlGet, function(err, result){
        if(err){
            console.log(err);
        }
        connection.release();
        res.send(issue);
    });
    connection.execSql(request);
});

How to maintain the connection without getting lost?

Hari Prasath
  • 111
  • 1
  • 2
  • 8

0 Answers0