Skip to content

Potential memory leak when using domains #1242

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

Closed
emptyemail opened this issue Oct 14, 2015 · 2 comments
Closed

Potential memory leak when using domains #1242

emptyemail opened this issue Oct 14, 2015 · 2 comments
Assignees
Labels

Comments

@emptyemail
Copy link

Hi, not sure this is an issue, but I discovered that connection._socket will maintain a link to the domain that was active when the connection was first utilized. Since we usually use a connection pool its very likely that the domain in question is no longer valid but the socket is still referencing it. My suggestion would be to bind the connect method to the domain that was active when the connection was created.

@dougwilson
Copy link
Member

I have never used domains, rather the current implementation was donated via a PR :) Domains in Node.js have been deprecated for a while (https://nodejs.org/api/domain.html), so I'm not sure if this is a bug in domains themselves or here. Please feel free to provide a PR.

@dougwilson
Copy link
Member

dougwilson commented Jun 1, 2016

We'll make sure that the connections from the pool end up bound to the same domain that the pool is bound to.

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

No branches or pull requests

2 participants