mattdesl / budo

:clapper: a dev server for rapid prototyping
MIT License
2.18k stars 106 forks source link

possible EventEmitter memory leak detected #128

Closed rybesh closed 8 years ago

rybesh commented 8 years ago

I regularly get this warning when running budo:

> baxley@ serve /Users/ryanshaw/Code/react-transcript-player/examples/baxley
> npm -s run watch-css & budo index.js:bundle.js --live | garnish

 info budo: Server running at http://172.31.99.141:9966/ (connect)
 info budo: LiveReload running on 35729
 info browserify: /bundle.js 6580731 2697ms (bundle)
 info http: GET /bundle.js 200 1ms (generated)
(node) warning: possible EventEmitter memory leak detected. 11 readable listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at DestroyableTransform.addListener (events.js:239:17)
    at emitDataEvents (/Users/ryanshaw/Code/react-transcript-player/examples/baxley/node_modules/inject-lr-script/node_modules/readable-stream/lib/_stream_readable.js:781:10)
    at DestroyableTransform.Readable.resume (/Users/ryanshaw/Code/react-transcript-player/examples/baxley/node_modules/inject-lr-script/node_modules/readable-stream/lib/_stream_readable.js:755:3)
    at ServerResponse.ondrain (stream.js:41:14)
    at emitNone (events.js:72:20)
    at ServerResponse.emit (events.js:166:7)
    at Socket.ondrain (_http_common.js:193:44)
    at emitNone (events.js:72:20)
    at Socket.emit (events.js:166:7)
    at onwriteDrain (_stream_writable.js:356:12)
mattdesl commented 8 years ago

Thanks. Can you update to the latest budo and remove the garnish pipe?

(budo should print 7.1.0 on budo --version)

mattdesl commented 8 years ago

I have seen this in a couple issues but I haven't yet been able to reproduce it easily in a test case. It may be related to the server issues or something unrelated.

quantizor commented 8 years ago

This is a garbage error. You can get rid of it if desired by boosting the max limit. Other variants of EventEmitter (like EE3) have entirely removed the warning since it is nonsensical.

mattdesl commented 8 years ago

This should be fixed in 8.0.0 – please let me know if you see it again.

rybesh commented 8 years ago

That fixed it; thanks!