Reputation: 1011
I am using sails-mongo .
MongoLocal: {
module: 'sails-mongo',
host: 'localhost',
port : '27017',
user: '',
password: '',
database: 'test'
}
I would like to know when is the sails.js closing the connections for mongodb ?
For eg : Currently , if i have 10models , total connections is about 70-90 connections. How can i make it only one connection per one application instance?
Please help. Thanks a lot.
Upvotes: 3
Views: 485
Reputation: 6173
I found there's a poolSize in the configuration of sails-mongo
here and the sails-mongo
is using Mongo native client which has a key maxPoolSize.
Haven't tried it but maybe its something you're looking for
{
module: 'sails-mongo',
host: 'localhost',
port : '27017',
user: '',
password: '',
database: 'test',
maxPoolSize: 1,
poolSize: 1
}
Upvotes: 1