Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventEmitter: memory leak detected. Propose change-out deprecated request-library #112

Open
0xgeert opened this issue Feb 17, 2022 · 1 comment

Comments

@0xgeert
Copy link

0xgeert commented Feb 17, 2022

I'm getting a lot of 'EventEmitter: memory leak detected'-messages, which turn out to be real: process crashes with an OOM after a day or so.

This is due to the request-lib not behaving nicely. request/request#3139.
This won't get fixed since request-library is deprecated.

Would you consider changing this out for something more robust, like axios, superagent, fetch?

@0xgeert
Copy link
Author

0xgeert commented Mar 1, 2022

Doesn't solve the underlying issue (OOM still happens), but get rid of the warnings

// Prevent eventEmitter: memory leak detected to be shown. This happens (probably) inside request.js which is used by Clickhouse
// https://github.com/request/request/issues/3139
const EventEmitter = require('events');
EventEmitter.prototype.setMaxListeners(Infinity)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant