Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit. #6251

Closed
ljack opened this issue Feb 16, 2016 · 7 comments

Comments

@ljack
Copy link

@ljack ljack commented Feb 16, 2016

No idea what this means. After 50 reloads this will appear in console log.

(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at StatWatcher.addListener (events.js:160:15)
    at Object.fs.watchFile (fs.js:1175:8)
    at Object.files.watchFile (/tools/fs/files.js:1486:10)
    at Object.watch (/tools/fs/safe-pathwatcher.js:85:9)
    at Watcher._watchFileOrDirectory (/tools/fs/watch.js:469:35)
    at /tools/fs/watch.js:547:18
    at Array.forEach (native)
    at Function._.each._.forEach (/home/ubuntu/.meteor/packages/meteor-tool/.1.1.13-modules.8.l2zx36++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
    at onWatchEvent (/tools/fs/watch.js:536:11)
    at thenCallback (/tools/utils/func-utils.js:37:18)
    at /home/ubuntu/.meteor/packages/coffeescript/.1.0.12-modules.8.fkqumq++os+web.browser+web.cordova/plugin.compileCoffeescript.os/npm/promise/node_modules/meteor-promise/fiber_pool.js:33:40
@ljack
Copy link
Author

@ljack ljack commented Feb 16, 2016

#6247 maybe same error?

@AysadKozanoglu
Copy link

@AysadKozanoglu AysadKozanoglu commented Sep 3, 2016

to fix it:

require('events').EventEmitter.defaultMaxListeners = Infinity;  
@FredLackeyOfficial
Copy link

@FredLackeyOfficial FredLackeyOfficial commented Sep 17, 2016

@AysadKozanoglu : Could you be more specific? I'm seeing this on a new machine / new install while running npm install on a project.

@puppeteer701
Copy link

@puppeteer701 puppeteer701 commented Sep 21, 2016

I am also seeing this error with 6.6 version of node when doing npm install.

@evolross
Copy link
Contributor

@evolross evolross commented Sep 15, 2017

I see this on my Galaxy logs. Using Meteor 1.5.1.

@scottstensland
Copy link

@scottstensland scottstensland commented Oct 20, 2018

seeing this on METEOR@1.7.0.5
Does anyone have any suggestions ?

@gjr-qm
Copy link

@gjr-qm gjr-qm commented Oct 20, 2018

I had this error once. I solved it by placing the code in a separate Fiber like so:

// running job in a Fiber, if running without there will be a memory leak error
// (possible EventEmitter memory leak detected. 11 listeners added)
Fiber(function () {
    // code that causes the error
}).run();

I can't recall how I came up with the solution, but it worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants