Thanks for sharing your example and for the feedback!

I’ve checked your example and it appears that your app might have a resource leak issue.

I didn’t find call of namespace.bindEmitter() function in your CLS integration middleware: https://github.com/ericzon/logger-wrapper-with-cls/blob/master/middlewares/cls.js

You can see an example of bindEmitter() usage in cls-rtracer: https://github.com/puzpuzpuz/cls-rtracer/blob/master/index.js#L18

Also see cls-hooked docs for more details: https://github.com/jeff-lewis/cls-hooked#namespacebindemitteremitter

Distributed systems gazer. Node.js contributor. Occasional tech blogger and speaker.

Distributed systems gazer. Node.js contributor. Occasional tech blogger and speaker.