This error comes after 8-10 hours of my web services running continously with forever module.
{
"date": "Wed Sep 13 2017 21:22:25 GMT+0000 (UTC)",
"process": {
"pid": 24337,
"uid": 1000,
"gid": 1000,
"cwd": "/path/to/my/file/",
"execPath": "/path/to/my/nvm/.nvm/versions/node/v4.4.5/bin/node",
"version": "v4.4.5",
"argv": ["/path/to/my/nvm/.nvm/versions/node/v4.4.5/bin/node", "/path/to/my/file/app.js"],
"memoryUsage": {
"rss": 133083136,
"heapTotal": 83753568,
"heapUsed": 71120576
}
},
"os": {
"loadavg": [0.0029296875, 0.0146484375, 0.04541015625],
"uptime": 397147
},
"trace": [{
"column": 13,
"file": "/path/to/my/file/node_modules/mysql/lib/protocol/Protocol.js",
"function": "Protocol.end",
"line": 109,
"method": "end",
"native": false
}, {
"column": 28,
"file": "/path/to/my/file/node_modules/mysql/lib/Connection.js",
"function": "",
"line": 102,
"method": null,
"native": false
}, {
"column": 20,
"file": "events.js",
"function": "emitNone",
"line": 72,
"method": null,
"native": false
}, {
"column": 7,
"file": "events.js",
"function": "Socket.emit",
"line": 166,
"method": "emit",
"native": false
}, {
"column": 12,
"file": "_stream_readable.js",
"function": "endReadableNT",
"line": 913,
"method": null,
"native": false
}, {
"column": 9,
"file": "node.js",
"function": "nextTickCallbackWith2Args",
"line": 442,
"method": null,
"native": false
}, {
"column": 17,
"file": "node.js",
"function": "process._tickDomainCallback",
"line": 397,
"method": "_tickDomainCallback",
"native": false
}],
"stack": ["Error: Connection lost: The server closed the connection.", " at Protocol.end (/path/to/my/file/node_modules/mysql/lib/protocol/Protocol.js:109:13)", " at Socket.<anonymous> (/path/to/my/file/node_modules/mysql/lib/Connection.js:102:28)", " at emitNone (events.js:72:20)", " at Socket.emit (events.js:166:7)", " at endReadableNT (_stream_readable.js:913:12)", " at nextTickCallbackWith2Args (node.js:442:9)", " at process._tickDomainCallback (node.js:397:17)"],
"level": "error",
"message": "uncaughtException: Connection lost: The server closed the connection.",
"timestamp": "2017-09-13T21:22:25.271Z"
}
couldnt find out why this is happening? i have also checked whether my databse is going idle or not but my db is perfect it is not going idle. Then what else is killing my node process? i have done several research on which is killing my API'S i had no idea .then i started logging the requests through api then i found out this error message and this comes only after several hours of continous processing.