so i have monit accessing a test URL on my nodejs server (running under PM2), this happens once a day, causing my nodejs to restart every day
failed protocol test [HTTP] at INET[localhost:80/test] via TCP -- HTTP: Error receiving data -- Connection reset by peer
I am using express,
var express = require('express'),
http = require('http'),
https = require('https'),
admin = require('./admin');
web.get('/test', admin.test);
and on admin.js
exports.test = function(req, res) {
res.send("OK");
}
I don't see any errors on my logs whenever this happens, i have these catches
process.on('uncaughtException', function(err) { c.log("Uncaught Exception",err.stack); });
process.addListener('SIGPIPE', function (err) { c.log("SIGPIPE",err.stack); });
I don't know where the connection reset happens, anyone has any idea how i can isolate the problem?