我m fresh to node.js. I
正在测试node.js项目。我遇到了一些问题。首先,我连接几个postgresql数据库,一切顺利。但是在添加了两个到postgrelSql数据库的新连接之后,这是我的连接代码:
var dbConfig = config.dbOrderV2;
exports.ORDERV2 = {};
exports.ORDERV2 = new Sequelize(dbConfig.dbname, dbConfig.username, dbConfig.password, {
dialect: dbConfig.dialect,
host: dbConfig.host,
port: dbConfig.port,
timezone: '+08:00',
logging: undefined,
pool: {
maxConnections: dbConfig.pool
}
});
var dbConfig = config.dbPay;
exports.PAY = {};
exports.PAY = new Sequelize(dbConfig.dbname, dbConfig.username, dbConfig.password, {
dialect: dbConfig.dialect,
host: dbConfig.host,
port: dbConfig.port,
timezone: '+08:00',
logging: undefined,
pool: {
maxConnections: dbConfig.pool
}
});
我启动项目,这是警告:
(node) warning: possible EventEmitter memory leak detected. 11 exit listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at process.addListener (events.js:239:17)
at ConnectionManager (/Users/yangtao/Documents/code/zhike/data_import_export/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:45:11)
at new ConnectionManager (/Users/yangtao/Documents/code/zhike/data_import_export/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:13:29)
at new PostgresDialect (/Users/yangtao/Documents/code/zhike/data_import_export/node_modules/sequelize/lib/dialects/postgres/index.js:12:28)
at new Sequelize (/Users/yangtao/Documents/code/zhike/data_import_export/node_modules/sequelize/lib/sequelize.js:213:18)
at Object.<anonymous> (/Users/yangtao/Documents/code/zhike/data_import_export/src/common/dbs.js:185:19)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/yangtao/Documents/code/zhike/data_import_export/src/common/global.js:21:14)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/yangtao/Documents/code/zhike/data_import_export/dummyWorker.js:3:1)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
有人可以帮我解决吗?感谢。