Skip to content

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

@lioulbehailu

Description

@lioulbehailu

_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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions