-
Notifications
You must be signed in to change notification settings - Fork 66
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
MaxListenersExceededWarning: Possible EventEmitter memory leak detected #72
Comments
I created a custom node script to start IPX, and increased the limit to "50". |
Hi. Do you mind providing a reproduction? 🙏🏼 |
At first, I was using Then, I created a little script, based on import consola from 'consola'
import { listen } from 'listhen'
import { createIPX, createIPXMiddleware } from 'ipx'
import { EventEmitter } from 'events';
// Added line
EventEmitter.defaultMaxListeners = 50;
async function main() {
const ipx = createIPX({})
const middleware = createIPXMiddleware(ipx)
await listen(middleware, {
clipboard: false
})
}
main().catch((err) => {
consola.error(err)
process.exit(1)
}) But I'm still getting the issue, with between 20 and 200 requests per minute. I'm using node 16 and npm 8.5.0. |
Me too. And I set the evetemitter's maxListeners to zero. |
I running IPX with
npx ipx
and some env vars.I'm getting a lot of warnings in production:
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
The text was updated successfully, but these errors were encountered: