winston-papertrail icon indicating copy to clipboard operation
winston-papertrail copied to clipboard

possible EventEmitter memory leak detected

Open gmarcz opened this issue 10 years ago • 2 comments

I got this strange error in my log file, is it related to this module ? It is not the full trace but these lines keep repeating.

2014-10-22T09:30:31.326261002Z (node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit. 2014-10-22T09:30:31.330676223Z Trace 2014-10-22T09:30:31.330676223Z at EventEmitter.addListener (events.js:160:15) 2014-10-22T09:30:31.330676223Z at Readable.on (_stream_readable.js:689:33) 2014-10-22T09:30:31.330676223Z at Readable.pipe (_stream_readable.js:491:8) 2014-10-22T09:30:31.330676223Z at pipe (tls.js:1409:18) 2014-10-22T09:30:31.330676223Z at exports.connect (tls.js:1355:19) 2014-10-22T09:30:31.330676223Z at Socket. (/src/node_modules/winston-papertrail/lib/winston-papertrail.js:136:29) 2014-10-22T09:30:31.330676223Z at g (events.js:180:16) 2014-10-22T09:30:31.330676223Z --------------------------------------------- 2014-10-22T09:30:31.330676223Z at Socket.connect (net.js:800:10) 2014-10-22T09:30:31.330676223Z at exports.connect.exports.createConnection (net.js:94:35) 2014-10-22T09:30:31.330676223Z at connectStream (/src/node_modules/winston-papertrail/lib/winston-papertrail.js:134:27) 2014-10-22T09:30:31.330676223Z at CleartextStream. (/src/node_modules/winston-papertrail/lib/winston-papertrail.js:176:15) 2014-10-22T09:30:31.330676223Z at EventEmitter.emit (events.js:117:20) 2014-10-22T09:30:31.330676223Z at _stream_readable.js:920:16 2014-10-22T09:30:31.330676223Z --------------------------------------------- 2014-10-22T09:30:31.330676223Z at Readable.on (_stream_readable.js:689:33) 2014-10-22T09:30:31.330676223Z at Socket. (/src/node_modules/winston-papertrail/lib/winston-papertrail.js:175:23) 2014-10-22T09:30:31.330676223Z at g (events.js:180:16) 2014-10-22T09:30:31.330676223Z at EventEmitter.emit (events.js:92:17) 2014-10-22T09:30:31.330676223Z at afterConnect (net.js:883:10) 2014-10-22T09:30:31.330676223Z --------------------------------------------- 2014-10-22T09:30:31.330676223Z at Socket.connect (net.js:800:10) 2014-10-22T09:30:31.330676223Z at exports.connect.exports.createConnection (net.js:94:35) 2014-10-22T09:30:31.330676223Z at connectStream (/src/node_modules/winston-papertrail/lib/winston-papertrail.js:134:27) 2014-10-22T09:30:31.330676223Z at CleartextStream. (/src/node_modules/winston-papertrail/lib/winston-papertrail.js:176:15) 2014-10-22T09:30:31.330676223Z at EventEmitter.emit (events.js:117:20) 2014-10-22T09:30:31.330676223Z at _stream_readable.js:920:16 2014-10-22T09:30:31.330676223Z --------------------------------------------- 2014-10-22T09:30:31.330676223Z at Readable.on (_stream_readable.js:689:33) 2014-10-22T09:30:31.330676223Z at Socket. (/src/node_modules/winston-papertrail/lib/winston-papertrail.js:175:23) 2014-10-22T09:30:31.330676223Z at g (events.js:180:16) 2014-10-22T09:30:31.330676223Z at EventEmitter.emit (events.js:92:17) 2014-10-22T09:30:31.330676223Z at afterConnect (net.js:883:10) 2014-10-22T09:30:31.330676223Z --------------------------------------------- 2014-10-22T09:30:31.330676223Z at Socket.connect (net.js:800:10) 2014-10-22T09:30:31.330676223Z at exports.connect.exports.createConnection (net.js:94:35) 2014-10-22T09:30:31.330676223Z at connectStream (/src/node_modules/winston-papertrail/lib/winston-papertrail.js:134:27) 2014-10-22T09:30:31.330676223Z at CleartextStream. (/src/node_modules/winston-papertrail/lib/winston-papertrail.js:176:15) 2014-10-22T09:30:31.330676223Z at EventEmitter.emit (events.js:117:20) 2014-10-22T09:30:31.330676223Z at _stream_readable.js:920:16 2014-10-22T09:30:31.330676223Z --------------------------------------------- 2014-10-22T09:30:31.330676223Z at Readable.on (_stream_readable.js:689:33) 2014-10-22T09:30:31.330676223Z at Socket. (/src/node_modules/winston-papertrail/lib/winston-papertrail.js:175:23) 2014-10-22T09:30:31.330676223Z at g (events.js:180:16) 2014-10-22T09:30:31.330676223Z at EventEmitter.emit (events.js:92:17) 2014-10-22T09:30:31.330676223Z at afterConnect (net.js:883:10) 2014-10-22T09:30:31.330676223Z --------------------------------------------- 2014-10-22T09:30:31.330676223Z at Socket.connect (net.js:800:10) 2014-10-22T09:30:31.330676223Z at exports.connect.exports.createConnection (net.js:94:35) 2014-10-22T09:30:31.330676223Z at connectStream (/src/node_modules/winston-papertrail/lib/winston-papertrail.js:134:27) 2014-10-22T09:30:31.330676223Z at CleartextStream. (/src/node_modules/winston-papertrail/lib/winston-papertrail.js:176:15) 2014-10-22T09:30:31.330676223Z at EventEmitter.emit (events.js:117:20) 2014-10-22T09:30:31.330676223Z at _stream_readable.js:920:16 2014-10-22T09:30:31.330676223Z ---------------------------------------------

gmarcz avatar Oct 22 '14 09:10 gmarcz

I've seen that in other code (external to winston-papertrail), but it's possible that it's a result of not doing something correct. I'll dive into it.

kenperkins avatar Oct 22 '14 13:10 kenperkins

Getting the same error sometimes, however don't know the exact payload of the logger which causes this error. It seems that some big payload could cause it.

joula avatar Nov 10 '14 08:11 joula