mongodb/mongodb-connection
Optimize MongoDB client connection pools, timeouts, and serverless patterns
Description
mongodb-connection is an agent skill that helps a coding assistant set up and tune MongoDB client connections in the supported driver languages. It works on connection pool sizes, timeouts and connection reuse, and adjusts them to the deployment type, the workload and the expected concurrency. The skill also diagnoses connection problems such as pool exhaustion, ECONNREFUSED errors and socket timeouts. Its approach is to ground the numbers in your actual deployment topology, driver and workload instead of copying values from a blog post. Typical tasks it covers are sizing maxPoolSize for a Lambda function that talks to an Atlas cluster, debugging a MongoWaitQueueTimeoutError in a Node.js API under load, setting socketTimeoutMS for long analytical aggregations, reusing one MongoClient across warm serverless invocations, and calculating the total number of server connections a replica set will see from ten application instances. Install it with the command shown on this page.…
Highlights
- Connection pool sizing for your deployment
- Timeout tuning for slow queries
- Serverless connection reuse
- Diagnoses pool exhaustion and socket errors
- Works across MongoDB driver languages
Ratings & Reviews
No ratings yet
Be the first to rate mongodb/mongodb-connection.
People also visit
mongodb/mongodb-mcp-setup
Set up the MongoDB MCP server with authentication and connection configuration
mongodb/mongodb-connection FAQ
What does this skill do?
It helps a coding assistant configure and troubleshoot MongoDB client connection pools, timeouts and reuse.
How do I install it?
Run npx skills add https://github.com/mongodb/agent-skills --skill mongodb-connection, or paste the skill link into your coding assistant and ask it to install the skill.
Does it work for serverless apps?
Yes. The page covers reusing a MongoClient across warm serverless invocations and sizing pools for functions such as Lambda.
Which errors can it diagnose?
Pool exhaustion, ECONNREFUSED and socket timeouts, including MongoWaitQueueTimeoutError.
What are the best mongodb/mongodb-connection alternatives?
Popular alternatives to mongodb/mongodb-connection include mongodb-connection, mongodb and mongodb-query-optimizer. See all mongodb/mongodb-connection alternatives









