othiym23 / node-continuation-local-storage

implementation of https://github.com/joyent/node/issues/5243
BSD 2-Clause "Simplified" License
1.13k stars 207 forks source link

CPU leak #107

Closed ghost closed 7 years ago

ghost commented 7 years ago

I am observing rapidly increasing response times around a no-op route when using CLS. See http://stackoverflow.com/questions/42345624/addition-of-continuation-local-storage-causing-cpu-leak and https://github.com/myles-mcdonnell/cls-express-cpu-leak.

Must be something I'm doing wrong in my usage of CLS but can't figure out what.

ghost commented 7 years ago

ok, got it..only one namespace require, not one per request...now using cls-middleware.