sanketbajoria / ssh2-promise

ssh with promise/async await and typescript support
https://www.npmjs.com/package/ssh2-promise
MIT License
148 stars 25 forks source link

MaxListenersExceededWarning: Possible EventEmitter memory leak detected. #77

Closed kyledecot closed 2 years ago

kyledecot commented 2 years ago

I'm using ssh2-promise to download a number of large files from an SFTP server. About half way through my process I see the following in my logs:

(node:29) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 ssh listeners added to [SSHConnection]. Use emitter.setMaxListeners() to increase limit
(node:29) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 tunnel listeners added to [SSHConnection]. Use emitter.setMaxListeners() to increase limit
(node:29) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 ssh:disconnect listeners added to [SSHConnection]. Use emitter.setMaxListeners() to increase limit