Issue
I am currently connecting to mongodb atlas using the following code
exports.connectToMongoose = async() =>{
try{
const result = await mongoose.connect(process.env.mongodbURL,{
useNewUrlParser: true,
useUnifiedTopology: true,
useCreateIndex:true,
useFindAndModify:false
})
}
const connectionResult = await mongooseConnection.connectToMongoose();
Although I am the only one user logged In . I can see that mongodb atlas is using 25 connections from the 500 available. Why does each client uses 25 connections and does that mean the mongodb atlas can only handle 20 concurrent clients
Solution
db.serverStatus().connections
This may be helpful to get the total connections from your clients to your server or primary node in your cluster
Answered By - Kirk Patrick Brown Answer Checked By - Candace Johnson (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.