RequestError: Connection lost - read ECONNRESET for mssql in nodejs RequestError: Connection lost - read ECONNRESET for mssql in nodejs express express

RequestError: Connection lost - read ECONNRESET for mssql in nodejs


In your connection options please mention stream :true to insert multiple records.

const conn = new sql.ConnectionPool({   user: "XXXXXXXXX",   password: "XXXXXXXXXXX",   server: "XXXXXXXXXXX",   database: "TESTDATA",   options: {    instanceName: "XXX"   },   stream:true,   pool: {     max: 10,     min: 0,     idleTimeoutMillis: 30000   } });


I guess there is a parameter which determines the max allowed data at a time

Iam not familiar with mssql,but in MySQL when we want to insert large data at once we will change the parameter max_allowed_packet to a large value

so check if there is a similar parameter and change it