Error: Connection lost: The server closed the connection.

88 views
Skip to first unread message

Akash D

unread,
Sep 15, 2022, 6:39:35 AM9/15/22
to node-mysql
Hello sir ,
 Connection to mysql server is getting lost when am doing batch insert for some time , could you please help me with the below error.

3|api2  | Error: Connection lost: The server closed the connection.
3|api2  |     at Protocol.end (/usr/share/nginx/html/API2/node_modules/mysql/lib/protocol/Protocol.js:112:13)
3|api2  |     at Socket.<anonymous> (/usr/share/nginx/html/API2/node_modules/mysql/lib/Connection.js:94:28)
3|api2  |     at Socket.<anonymous> (/usr/share/nginx/html/API2/node_modules/mysql/lib/Connection.js:526:10)
3|api2  |     at Socket.emit (events.js:326:22)
3|api2  |     at endReadableNT (_stream_readable.js:1241:12)
3|api2  |     at processTicksAndRejections (internal/process/task_queues.js:84:21)
3|api2  |     --------------------
3|api2  |     at Pool.query (/usr/share/nginx/html/API2/node_modules/mysql/lib/Pool.js:199:23)
3|api2  |     at /usr/share/nginx/html/API2/routes/cm_rpt_route.js:276:38
3|api2  |     at new Promise (<anonymous>)
3|api2  |     at /usr/share/nginx/html/API2/routes/cm_rpt_route.js:274:35
3|api2  |     at runMicrotasks (<anonymous>)
3|api2  |     at processTicksAndRejections (internal/process/task_queues.js:97:5) {
3|api2  |   fatal: true,
3|api2  |   code: 'PROTOCOL_CONNECTION_LOST'
3|api2  | }

Thanks and regards
Akash D
Developer
Kasplo
Reply all
Reply to author
Forward
0 new messages