PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, April 21, 2022

[FIXED] Why is mongodb atlas using 25 connections per 1 active client

 April 21, 2022     connection, mongodb, mongodb-atlas     No comments   

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)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing