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

Multiple gateways with socket.io get (disconnect listeners added to [Socket]) #7287

Closed
aviadhadidainx opened this issue Jun 22, 2021 · 9 comments

Comments

@aviadhadidainx
Copy link

aviadhadidainx commented Jun 22, 2021

Bug Report
Current behavior
Using multiple gateway (Same socket io server).
When there a connection we get 'Possible EventEmitter memory leak detected. X disconnect listeners added to [Socket]'

It looks like for every gateway for every connection is subscribed to disconnect event(Also connect). Look on image below:
image

image
The file is ws-adapter.js

Expected behavior
Not to get this warning or at least understand what can cause it and what is the risk

Possible Solution
N/A

Environment

Nest version: 7.6.11

I also tried to update to latest but with no success

For Tooling issues:

  • Node version: 12.16.3
  • Platform: Windows

Attached example project that reproduce this issue.
When you start the project you can see the warning on logs..

https://github.com/nestjs/nest/issues/7228

@aviadhadidainx aviadhadidainx added the needs triage This issue has not been looked into label Jun 22, 2021
@aviadhadidainx
Copy link
Author

16-gateways-ws.zip
Example with reproudction project is attached.. I just took the Gateway example and added 10 more gateways

@jmcdo29
Copy link
Member

jmcdo29 commented Jun 22, 2021

Is this related to #7249?

@aviadhadidainx
Copy link
Author

Looks like it is related.. But not 100% sure

@kamilmysliwiec
Copy link
Member

Can you please provide a minimum reproduction repository (and make it available through Github)?

@kamilmysliwiec kamilmysliwiec added needs clarification and removed needs triage This issue has not been looked into labels Jun 23, 2021
@aviadhadidainx
Copy link
Author

@aviadhadidainx
Copy link
Author

@kamilmysliwiec I updated the issue 13 days ago with repo and project that reproduce.
I think you missed it because now i guess this is enough for clarification. Correct? If no let me know and i will add what you need

@aviadhadidainx
Copy link
Author

@kamilmysliwiec Any updates? Maybe this issue needs another label?

@genadis
Copy link

genadis commented Jul 31, 2021

I believe it is related to: #6026 (comment)

@kamilmysliwiec
Copy link
Member

Let's track this here #7249

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

No branches or pull requests

4 participants