Skip to content

why can`t i set server_options? #198

@leekafai

Description

@leekafai
//log
0|bh       | { emitter: { domain: null, _events: {}, _maxListeners: 100 },
0|bh       |   state: 2,
0|bh       |   _dbconn:
0|bh       |    { domain: null,
0|bh       |      _events: {},
0|bh       |      _maxListeners: 10,
0|bh       |      databaseName: 'XX',
0|bh       |      serverConfig:
0|bh       |       { domain: null,
0|bh       |         _events: {},
0|bh       |         _maxListeners: 10,
0|bh       |         _callBackStore: [Object],
0|bh       |         _commandsStore: [Object],
0|bh       |         auth: [Object],
0|bh       |         _dbStore: [Object],
0|bh       |         host: 'localhost',
0|bh       |         port: 27017,
0|bh       |         options: [Object],
0|bh       |         internalMaster: true,
0|bh       |         connected: true,
**0|bh       |         poolSize: 1,**
0|bh       |         disableDriverBSONSizeCheck: false,
0|bh       |         _used: true,
0|bh       |         replicasetInstance: null,
0|bh       |         emitOpen: false,
0|bh       |         ssl: false,
0|bh       |         sslValidate: false,
0|bh       |         sslCA: null,
0|bh       |         sslCert: undefined,
0|bh       |         sslKey: undefined,
0|bh       |         sslPass: undefined,
0|bh       |         name: 'localhost:27017',
0|bh       |         _readPreference: null,
0|bh       |         socketOptions: [Object],
0|bh       |         logger: [Object],
0|bh       |         eventHandlers: [Object],
0|bh       |         _serverState: 'connected',
0|bh       |         _state: [Object],
0|bh       |         recordQueryStats: false,
0|bh       |         db: [Circular],
0|bh       |         dbInstances: [Object],
0|bh       |         connectionPool: [Object],
0|bh       |         isMasterDoc: [Object] },
0|bh       |      options:
0|bh       |       { safe: true,
**0|bh       |         poolSize: 8,**
0|bh       |         strict: true,
0|bh       |         username: 'XX',
0|bh       |         password: 'X',
0|bh       |         native_parser: true },
0|bh       |      _applicationClosed: false,
0|bh       |      slaveOk: false,
0|bh       |      native_parser: true,
//db.js
var db = mongoskin.db(
	'mongodb://' + mongodb.username + ':' + mongodb.password + '@' + mongodb.host + ':' + mongodb.port + '/' + mongodb.databaseName,
	{
		safe: true,poolSize:8,strict: true
	}
);

As i already set the options in db.js,the output log shows that the serverConfig poolSize is still 1,how can i set a larger poolSize?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions