Ordre Nln
Ordre Nln

Reputation: 157

How to know current pool size of mongodb nodejs native?

I am doing some research in maintaining mongodb connections. please help me How to know current pool size of mongodb nodejs native.

Upvotes: 2

Views: 1260

Answers (1)

Lukasz Wiktor
Lukasz Wiktor

Reputation: 20422

You can get the current pool size from:

db.serverConfig.poolSize

Where db is the Db object returned from MongoClient.connect.

The default pool size is 5.

Upvotes: 1

Related Questions