node.js - nodejs connect mongo have memory leak -
in node.js use expressjs , when connect mongodb, have trouble , have no idea why happens. search it's unclear.
(node) warning: possible eventemitter memory leak detected. 11 reconnect listeners added. use emitter.setmaxlisteners() increase limit. trace @ addlistener (events.js:179:15) @ server.connect (/home/repository/nodejs/blog/n-blog/node_modules/mongodb/lib/server.js:291:17) @ open (/home/repository/nodejs/blog/n-blog/node_modules/mongodb/lib/db.js:206:19) @ db.open (/home/repository/nodejs/blog/n-blog/node_modules/mongodb/lib/db.js:229:44) @ function.user.get (/home/repository/nodejs/blog/n-blog/models/user.js:55:10) @ context.<anonymous> (/home/repository/nodejs/blog/n-blog/test/models/userspec.js:63:9) @ test.runnable.run (/home/repository/nodejs/blog/n-blog/node_modules/mocha/lib/runnable.js:233:15) @ runner.runtest (/home/repository/nodejs/blog/n-blog/node_modules/mocha/lib/runner.js:390:10) @ /home/repository/nodejs/blog/n-blog/node_modules/mocha/lib/runner.js:473:12 @ next (/home/repository/nodejs/blog/n-blog/node_modules/mocha/lib/runner.js:315:14) @ /home/repository/nodejs/blog/n-blog/node_modules/mocha/lib/runner.js:325:7 @ next (/home/repository/nodejs/blog/n-blog/node_modules/mocha/lib/runner.js:260:23) @ immediate._onimmediate (/home/repository/nodejs/blog/n-blog/node_modules/mocha/lib/runner.js:292:5) @ processimmediate [as _immediatecallback] (timers.js:367:17) (node) warning: possible eventemitter memory leak detected. 11 destroy listeners added. use emitter.setmaxlisteners() increase limit. trace @ addlistener (events.js:179:15) @ once (events.js:204:8) @ connecthandler (/home/repository/nodejs/blog/n-blog/node_modules/mongodb/lib/server.js:265:19) @ g (events.js:199:16) @ emit (events.js:107:17) @ /home/repository/nodejs/blog/n-blog/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:399:23 @ /home/repository/nodejs/blog/n-blog/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:806:13 @ callbacks.emit (/home/repository/nodejs/blog/n-blog/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:95:3) @ null.messagehandler (/home/repository/nodejs/blog/n-blog/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:246:23) @ socket.<anonymous> (/home/repository/nodejs/blog/n-blog/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:262:22) @ socket.emit (events.js:107:17) @ readableaddchunk (_stream_readable.js:163:16) @ socket.readable.push (_stream_readable.js:126:10) @ tcp.onread (net.js:538:20)
for temporary, find fixing works me. still don't know underlying happened https://stackoverflow.com/a/26176922/2284020
Comments
Post a Comment