Giter Site home page Giter Site logo

Comments (4)

dhensby avatar dhensby commented on June 5, 2024

Does this happen if you use tedious directly? I'd like to rule out the memory leak happening outside the library.

from node-mssql.

mplantard avatar mplantard commented on June 5, 2024

Good point, it seems it does with Tedious too, still the same error with the code below.

I wasn't expecting the stream behavior being implemented at the Tedious level but considering the pace of the logs I'm reconsidering my assumption.

let Connection = require('tedious').Connection;
let Request = require('tedious').Request;

let connection = new Connection(config);

// Setup event handler when the connection is established. 
connection.on('connect', function(err) {

    if(err) console.log('Error: ', err)

    // If no error, then good to go...
    let count = 0;
    let subCount = 0;

    const request = new Request('select * from MyTable', function(err, _rowCount) {
        if(err){
            console.log(err)
        } else {
            connection.close()
        };
    });

    request.on('row', function (_columns) {
        count++;
        subCount++;
        if(subCount >= 10000){
            subCount = 0;
            console.log(count);
        }
    });
    request.on('done', function (_rowCount, _more, _rows) { console.log('Completed') });

    connection.execSql(request);
});

// Initialize the connection.
connection.connect();

from node-mssql.

dhensby avatar dhensby commented on June 5, 2024

OK - I think this is best raised in the tedious repo, if you can replicate the problem directly there.

from node-mssql.

dhensby avatar dhensby commented on June 5, 2024

Seeing as this appears to be a problem with the underlying driver, I'm going to close this issue. Feel free to add any related comments here or if there's also a problem in this library, we can re-open it.

from node-mssql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.