Jeff-Lewis / cls-hooked

cls-hooked : CLS using AsynWrap or async_hooks instead of async-listener for node 4.7+
BSD 2-Clause "Simplified" License
759 stars 89 forks source link

AsyncHook MemoryLeak fixes #60

Open alexgarbarev opened 4 years ago

alexgarbarev commented 4 years ago

It looks like we have to disable hook, when namespace is destoryed. Otherwise it would live forever and hence it would retain namespace object with all it's massive _context.

More details how I replicated and fixed the issue described here: https://github.com/liberation-data/drivine/issues/35#issuecomment-637567531

orloffv commented 3 years ago

@Jeff-Lewis ping(

diestrin commented 3 years ago

Any updates on this @Jeff-Lewis ?

SimonX200 commented 3 years ago

It looks like we have to disable hook, when namespace is destoryed. Otherwise it would live forever and hence it would retain namespace object with all it's massive _context.

You haven't yet noticed that cls-hooked has a major memory leak?

See:

https://github.com/Jeff-Lewis/cls-hooked/issues/63

And btw: a performance problem as well?