Thanks to visit codestin.com
Credit goes to officialskills.sh

Back to skills

mongodb-connection

officialdata

Configures MongoDB client connections across supported driver languages.

Setup & Installation

npx skills add https://github.com/mongodb/agent-skills --skill mongodb-connection
or paste the link and ask your coding assistant to install it
https://github.com/mongodb/agent-skills/tree/main/skills/mongodb-connection
View on GitHub

What This Skill Does

Configures MongoDB client connections across supported driver languages. Tunes pool sizes, timeouts, and reuse patterns based on deployment type, workload, and concurrency. Diagnoses connection errors like pool exhaustion, ECONNREFUSED, and socket timeouts.

Grounds pool and timeout values in the actual deployment topology, driver type, and workload instead of copying arbitrary numbers from a blog post.

When to use it

  • Sizing maxPoolSize for a Lambda function hitting an Atlas cluster
  • Debugging MongoWaitQueueTimeoutError in a Node.js API under load
  • Setting socketTimeoutMS for long-running analytical aggregations
  • Reusing a MongoClient across warm serverless invocations
  • Calculating total server connections for a 10-instance replica set deployment