Reputation: 193
How do I get the current amount of connections to my MongoDB collection?
Upvotes: 2
Views: 879
Reputation: 67
Run this query:
db.serverStatus().connections
Should return a response containing the current, available, and total created connections.
More info in the official documentation: https://docs.mongodb.com/manual/reference/command/serverStatus/#connections
Upvotes: 1