Answer the question
In order to leave comments, you need to log in
MongoDB Topology was destroyed. How to set up a connection?
I have a small project (API) using MongoDB + NodeJS (Mongoose). It seems that with a large number of requests from users, a MongoDB connection error occurs and a Topology was destroyed error occurs. I looked through the answers to the question in the English-speaking sector - I did not understand anything particularly sensible. It seems that I just misconfigured my connection to Mongo. Maybe someone knows how best to set up a connection to production? Or tell me where to dig? The current settings for Mongo are:
{
server: {
auto_reconnect: true,
poolSize:100,
socketOptions: {
keepAlive: 10000,
connectTimoutMS: 10000
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question