Raynos/level-write-stream

Error: 11 _drain listeners

Opened this issue · 1 comments

I'm seeing this error a lot:

(node:6340) Warning: Possible EventEmitter memory leak detected. 11 _drain listeners added. Use emitter.setMaxListeners() to increase limit

I think it's because I'm calling write frequently. This happens even though I don't pass in a callback.

To silence the warning, I'm doing the following. Are there any performance concerns with adding this many listeners?

var dbWriteStream = LevelWriteStream(db)()
dbWriteStream.setMaxListeners(1000)