-
Notifications
You must be signed in to change notification settings - Fork 293
(node:87) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unhandledRejection listeners added to [process]. Use emitter.setMaxListeners() to increase limit #3040
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
Comments
add a log above the |
That's a good idea. Thanks. I tried it and see log message only once.
2020-10-28T17:36:59.813Z [Main] info: adding unhandledRejection handler
(node:8) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unhandledRejection listeners added to [process]. Use emitter.setMaxListeners() to increase limit
…________________________________
From: Lance J. <[email protected]>
Sent: Wednesday, October 28, 2020 2:41 AM
To: nodejs/help <[email protected]>
Cc: siddjain <[email protected]>; Author <[email protected]>
Subject: Re: [nodejs/help] (node:87) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unhandledRejection listeners added to [process]. Use emitter.setMaxListeners() to increase limit (#3040)
add a log above the process.on('unhandledRejection', ...) and see how often it is logged. those 11 eventlisteners have to come from somewhere
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnodejs%2Fhelp%2Fissues%2F3040%23issuecomment-717815661&data=04%7C01%7C%7Cc53be200647849245f0a08d87b25985b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637394748678242731%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ZvVGFPlNi3iPF0JHjF21nlMt6vnESYqUSAcnzQliFdE%3D&reserved=0>, or unsubscribe<https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAFZEMJGIHMUSFNBV3YVAT3SM7RLFANCNFSM4TBSBO5Q&data=04%7C01%7C%7Cc53be200647849245f0a08d87b25985b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637394748678252725%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=NF0wQcAXc0NJlKE6jkRrevoH4zRYUPvxSTHT1eEndVo%3D&reserved=0>.
|
thats weird. is it possible you add that event handler somewhere else? maybe log the event-emitter with console.dir. i believe it shows the registered event handlers. |
@siddjain any updates on this issue? Did you get a chance to try with latest nodejs version |
It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment. |
It seems there has been no activity on this issue for a while, and it is being closed. If you believe this issue should remain open, please leave a comment. |
node -v
v12.18.1
uname -a
Linux b8d5107fc64e 3.10.0-1062.9.1.el7.x86_64 #1 SMP Mon Dec 2 08:31:54 EST 2019 x86_64 Linux
(using node:12-alpine Docker image)
I have following code:
and it is triggering following warning:
The code is not inside any for loop. I am executing it only once. It seems like a bug.
The text was updated successfully, but these errors were encountered: