Is there a way to set or limit the number of connections to Mongo a single pymongo client instance will open? I don't want to modify Mongo config to do this, because I don't want to affect other applications.
Mongodb – Set or limit number of connections a single pymongo client will open
mongodbpython
Related Question
- MongoDB – How to Limit Connections Per Host
- MongoDB – How to Estimate Max Number of Connections Supported
- Mongodb – Too many open connections with MongoDB 2.6 + PyMongo 2.7.2
- How Does Pymongo Connection Work?
- MongoDB Replication – Changing Domain Name for Primary
- Mongodb – Multi-tenant reduce number of MongoDB connections
Best Answer
Use the following parameter to set the number of maximum connections from your pymongo app.
Here is documentation with more details.