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

_contextId: size keeps continuing to grow, even after destroying the namespace #68

Open
lioulbehailu opened this issue Jul 29, 2021 · 0 comments

Comments

@lioulbehailu
Copy link

lioulbehailu commented Jul 29, 2021

_contextId: size keeps continuing to grow, event after destroying the namespace. Doesn't create a Performance or a Memory leak problem when using in a production???

as you can see, i am destroying the namespace if it is not active

`app.use((req, res, next) => {

if (getNamespace('ADMIN') && getNamespace('ADMIN').active === null) {
	destroyNamespace('ADMIN')
}

if (getNamespace('user') &&getNamespace('user').active === null) {
	destroyNamespace('user');
}
next()});`

But the _contexts Map is growing in size.

May be i have misunderstand this in the wrong way, or may be not, but i think this gonna create when the server gets a request from multiple users

CLS-Hooked Issue

@lioulbehailu lioulbehailu changed the title _contextId: size keeps continuing to grow, event after destroying the namespace _contextId: size keeps continuing to grow, even after destroying the namespace Jul 29, 2021
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

No branches or pull requests

1 participant