Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Avoid max listener warnings... #5

Merged
merged 1 commit into from about 1 year ago

2 participants

Andy Burke Magnar Sveen
Andy Burke

Seeing this:

(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at EventEmitter.addListener (events.js:160:15)
    at /usr/local/lib/node_modules/proximity/node_modules/fs-watch-tree/lib/tree-watcher.js:74:21
    at /usr/local/lib/node_modules/proximity/node_modules/fs-watch-tree/lib/async.js:15:21
    at /usr/local/lib/node_modules/proximity/node_modules/fs-watch-tree/lib/fs-filtered.js:23:9
    at Object.oncomplete (fs.js:107:15)

Upping the max listeners seems to resolve it.

Is 128 too high? Maybe. Let me know and I can tune it down if it makes a difference to you.

Andy Burke andyburke Avoid warnings regarding max listeners.
Seeing this:

```
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at EventEmitter.addListener (events.js:160:15)
    at /usr/local/lib/node_modules/proximity/node_modules/fs-watch-tree/lib/tree-watcher.js:74:21
    at /usr/local/lib/node_modules/proximity/node_modules/fs-watch-tree/lib/async.js:15:21
    at /usr/local/lib/node_modules/proximity/node_modules/fs-watch-tree/lib/fs-filtered.js:23:9
    at Object.oncomplete (fs.js:107:15)
```

Upping the max listeners seems to resolve it.
2461886
Magnar Sveen
Collaborator

Thanks! Looking good.

Magnar Sveen magnars merged commit 6ef2f88 into from
Magnar Sveen magnars closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jun 05, 2013
Andy Burke andyburke Avoid warnings regarding max listeners.
Seeing this:

```
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at EventEmitter.addListener (events.js:160:15)
    at /usr/local/lib/node_modules/proximity/node_modules/fs-watch-tree/lib/tree-watcher.js:74:21
    at /usr/local/lib/node_modules/proximity/node_modules/fs-watch-tree/lib/async.js:15:21
    at /usr/local/lib/node_modules/proximity/node_modules/fs-watch-tree/lib/fs-filtered.js:23:9
    at Object.oncomplete (fs.js:107:15)
```

Upping the max listeners seems to resolve it.
2461886
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 3 additions and 0 deletions. Show diff stats Hide diff stats

  1. +3 0  lib/tree-watcher.js
3  lib/tree-watcher.js
@@ -71,6 +71,9 @@ function create(root, excludes) {
71 71 if (err) { return d.reject(err); }
72 72
73 73 var tracker = changeTracker.create(statFiles, files);
  74 +
  75 + // avoid warnings about max listeners
  76 + tracker.setMaxListeners( 128 );
74 77
75 78 tracker.on("create", watch);
76 79 tracker.on("delete", unwatch);

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.