node-firebird icon indicating copy to clipboard operation
node-firebird copied to clipboard

sequentially - Reached heap limit Allocation failed

Open arthurbolsoni opened this issue 2 years ago • 3 comments

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

arthurbolsoni avatar Sep 15 '23 19:09 arthurbolsoni