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

Fix memory leak in process.namespaces #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tlhunter
Copy link

Numeric namespace identifiers are never removed from the global process.namespaces object:

process.namespaces[name] = null;

process.namespaces[name] = null;

@tlhunter
Copy link
Author

^ I believe the test runner is having issues. The same failures occur locally in master, as well as other recent open PRs.

@MichaelRBond
Copy link

This branch significantly reduces the memory creep I've been seeing with cls-hooked.

@kibertoad
Copy link

@Jeff-Lewis Any chance this could be looked at? Btw, if you don't have time for the project anymore (which may be the case judging by amount of commits lately), I would be more than happy to volunteer to help maintain the project.

@kibertoad
Copy link

Any updates?..

@RemyLespagnol
Copy link

RemyLespagnol commented Dec 30, 2019

@Jeff-Lewis Any chance to take a look at this?

In production :

image

@alexgarbarev
Copy link

It looks like problem with leak is not in "process.namespaces" but in async_hook leaking. See #60 for details.

@orloffv
Copy link

orloffv commented Nov 12, 2020

@Jeff-Lewis ping(

@ridakk
Copy link

ridakk commented May 21, 2021

ayn update on this ? 👀

@kibertoad
Copy link

@ridakk It seems to be pretty abandoned. Either way, if you are on modern enough Node, migrating to AsyncLocalStorage is preferable.
In case you want to ease up migration from cls-hooked, you could use a compatibility bridge: https://github.com/kibertoad/asynchronous-local-storage

@ridakk
Copy link

ridakk commented May 21, 2021

@ridakk It seems to be pretty abandoned. Either way, if you are on modern enough Node, migrating to AsyncLocalStorage is preferable.
In case you want to ease up migration from cls-hooked, you could use a compatibility bridge: https://github.com/kibertoad/asynchronous-local-storage

@kibertoad thx for the heads up, and yes we are on latest lts but our problem is Sequelize and it still depends on cls-hooked 😩

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

Successfully merging this pull request may close these issues.

7 participants