hgourvest / node-firebird

Pure javascript and asynchronous Firebird client for Node.js.
Mozilla Public License 2.0
257 stars 128 forks source link

sequentially - Reached heap limit Allocation failed #313

Closed arthurbolsoni closed 4 months ago

arthurbolsoni commented 1 year ago

I'm trying to fetch a big table, I'm using it sequentially, which says in the readme that it streams the search information; however the memory is never freed and exceeds the heap memory

const connection = Firebird.attach(options, function (err: any, db: Firebird.Database) {
    if (err)
        throw err;

    db.sequentially(sql, [],
        (err: any, rows: any) => {
            rows = null;
        },
        (err: any) => {
            db.detach();
        });
});

image