Skip to content

EventEmitter memory leak detected #117

@zkrhm

Description

@zkrhm

hello, I have problem with mongoskin usage. I use it to move data from postgresql to mongodb. I use loop to move each data like this:

docs.forEach(function(item){
db.docs.insert(item, function(err){

    });

});

mongoskin always printed following warning:

warning: possible EventEmitter memory leak detected. 51 listeners added. Use emitter.setMaxListeners() to increase limit.

seems like 50 maximum listener limit defined inside the the library has been reached. I've try to google it and several sites said that the listener will be queued before connection made to mongodb.

are there more proper-and-not documented way provided to use mongoskin in such condition? are there any way to make node.js ignoring event listener addition?

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