What does Error: Connection already released really mean in Node?

198
March 02, 2018, at 9:18 PM

So i have a project i am working on, where i am running two mysql transactions one after another, my thought is that they are working sequentially, but i keep running into this "Error: Connection already released", so i think that what is happening is that after running one promise it drops the connection as the 2nd is due to pick up the next?

it('check list Table', function () {
return createList(listItem())
    .then(function (result) {
        console.log("insert for #1: ", result);
        return createList(listItem2())
            .then(result => {
                console.log("insert for #2: ", result);
            })
    });});

So my thought is that it should create list 1, THEN create list 2. It actually does run and does create the list in the database, and the test actually does work sometimes (I have removed the actual assert bits at the moment while i debug this bit).

So i guess - have i somehow created a race condition with the database that makes it work sometimes and not others?

Thanks Grant

Rent Charter Buses Company
READ ALSO
How to assign variable of outer function from inner function

How to assign variable of outer function from inner function

I am working on nodejs library called node-geocoder

168
How to update array of array objects key value in mongoose using nodejs

How to update array of array objects key value in mongoose using nodejs

How can update Options array of est_price value, please you have suggestionthank a lot and I wonder if some give any solutions? I tried like,

261
FileReader slice readAsDataURL

FileReader slice readAsDataURL

Question is how i can achieve it?

326
Angular 2 -Express + Node.Js

Angular 2 -Express + Node.Js

How to set up Angular 2 app with Node+Express?

288