-
Notifications
You must be signed in to change notification settings - Fork 89
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
CPU leakage #50
Comments
in my application , when many request coming, cpu will up too , and not down. when remove cls, will be ok! expect answer, 3q |
I'm also seeing graphs strikingly similar to what @Themandunord is seeing. Something's definitely leaky - also using Docker, Node 12 Alpine. So in my case, I was definitely using this wrong. I had some middleware that was doing something like this:
We were creating the namespace every time the middle was invoked; moving Obvious in hindsight, but perhaps there should be a warning or error if you try to create a namespace that already exists? |
Hi, I've started using this library on our production servers. It's a great help and saves a lot of "passing down" from one function to the next. However, over time I see that it increasingly uses more and more CPU resources, specifically around things related to async-hooks. I took a CPU profile of the server and I see emitHook going from 7% to 30%. Inside emitHook, the processes that grow the most are destroy (1% to 8%), before grows from 2% to ~6%, after (~1% to 6$). Is this expected. Am I using it wrong? Please advise.
Below is my code snippet.
The text was updated successfully, but these errors were encountered: