I am having some connection issues out to my replica set, the short of it is that we have WAY too many connections being opened and connections are not being closed.
As a test I created 500 connections out to our mongo instance and then ran the proper close statement:
process.on('SIGINT', function() {
mongoose.connection.close(function () {
console.log('Mongoose default connection disconnected through app termination');
process.exit(0);
});
});
However, 15 minutes later I still see those 500 connections even though the node process has been shut down entirely the whole time.
Any idea what might be causing these connections to linger around? Basically I am having issues on the mongo side that is causing me to run out of physical memory.
Thanks
Rob