I’m trying to incease mongodb connection pool size.
There isn’t much docs for this. But in mongodb docs I found poolSize
parameter. But I couldn’t find how to implement this to parse server.
Then I found a github issue.
There is an example code:
config.databaseOptions = {
socketTimeoutMS: 60000
};
var api = new ParseServer(config);
I will change socketTimeoutMS
to poolSize
and add to my parse server.
But problem here is; I’m using parse-server-example repo. And I initialize my parse server like this:
var api = new ParseServer({
allowClientClassCreation:false,
databaseURI: databaseUri ,
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
appId: process.env.APP_ID,
masterKey: process.env.MASTER_KEY
});
And I dont know where to put config file in example code.
Can you guys help me please?
Edit: I found something.
databaseOptions: { poolSize: 500 },
I will add this directly to my parse server config like this:
var api = new ParseServer({
allowClientClassCreation:false,
databaseURI: databaseUri ,
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
appId: process.env.APP_ID,
//Database Options
databaseOptions: { poolSize: 500 },
masterKey: process.env.MASTER_KEY
});
Is this setup correct?