I’m using sequelize(ORM) with node.js in aws lambda and I’m troubleshooting the ‘Error – write econnreset’ issue and I don’t know what’s causing it.
Please help me
Error contents
“stack”:”Error: n at Query.run (/opt/nodejs/node_modules/sequelize/src/dialects/mariadb/query.js:47:25)n at /opt/nodejs/node_modules/sequelize/src/sequelize.js:650:28n at processTicksAndRejections (node:internal/process/task_queues:95:5)n at MySQLQueryInterface.select (/opt/nodejs/node_modules/sequelize/src/dialects/abstract/query-interface.js:1001:12)n at Function.findAll (/opt/nodejs/node_modules/sequelize/src/model.js:1824:21)n at Function.findOne (/opt/nodejs/node_modules/sequelize/src/model.js:1998:12)n at file:///var/task/controller/video.js:64:19″,”message”:”write ECONNRESET”,”name”:”SequelizeDatabaseError”,”parent”:{“stack”:”Error: write ECONNRESETn at afterWriteDispatched (node:internal/stream_base_commons:160:15)n at writeGeneric (node:internal/stream_base_commons:151:3)n at Socket._writeGeneric (node:net:962:11)n at Socket._write (node:net:974:8)n at writeOrBuffer (node:internal/streams/writable:392:12)n at _write (node:internal/streams/writable:333:10)n at Socket.Writable.write (node:internal/streams/writable:337:10)n at Socket.socket.writeBuf (/opt/nodejs/node_modules/mariadb/lib/connection.js:884:49)n at PacketOutputStream.flushBufferBasic (/opt/nodejs/node_modules/mariadb/lib/io/packet-output-stream.js:698:17)n at PacketOutputStream.flush (/opt/nodejs/node_modules/mariadb/lib/io/packet-output-stream.js:155:10)”,”message”:”write ECONNRESET”,”name”:”Error”
Pool config
pool: {
max: 3,
min: 0,
idle: 0,
acquire: 3000,
evict: 18000 (lambda timeout)
},
I try Connection pool controll
pool: {
max: 3,
min: 0,
idle: 0,
acquire: 3000,
evict: 18000 (lambda timeout)
},
user25707552 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.