I have 7 NodeJS with Mongoose web services running in a small instance on Amazon AWS and a MongoDB in another small instance.
Everything works with a low level of use (both processor, memory, and network traffic) without high peaks.
But sometimes it seems that these NodeJS services NodeJS losing connection with MongoDB . All methods from services that do not use Mongoose continue to work fine. Those using Mongoose continue the endless call without any answer. I need to restart the services so that they respond again.
This happens randomly, and there is no pattern that I could figure out.
Another strange thing: on average, all services stop together. A rare thing happens to one, but it happens.
I could try splitting all the services into one server each, but that would be very expensive. But first, I would like to know what is happening and fix it.
Can someone help me?
source share