Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.exe Stuck at 100% CPU

I have a ExpressJS node.js application running on IISNode on Windows Server 2016 VM with 4 cores and 32GB of memory. I am able to set one process per core, so I have 4 node.exe's running for my app. Node version is v6.10.3.

This is what the resources normally look like:

My normal running processes

I can see that the node garbage collection seems to be occurring since the memory fluctuates. As in the screenshot, it will hover normally way below the peak working.

However I am trying to find the cause for one of these processes to spike to 100% CPU utilization. Whenever this occurs, I am forced to kill the node.exe because my entire application stalls. It will sit stalled at peak CPU, and all further requests are then spinning.

  1. What can causes high CPU utilization in the node.exe and how can it be locked at 100%? Is this due to the garbage collection stalling?
  2. What tools can be uses to figure out what node.exe is stalled on to better debug my application?
  3. Should IISNode be working as a load balancer and delegating all requests toward another core?

Right now I am forced to recycle my app pool on a timer to completely kill all working node processes and restart them. This curbs the application going down for long periods.

I appreciate any insight!

like image 395
ChrisK Avatar asked Oct 29 '22 01:10

ChrisK


1 Answers

I got same problem in my Windows 10. Open Task manager > Processes Nodejs: Server-side JavaScript(32 bit) was using %70 CPU. I found that article.

I used Microsoft Safety Scanner.

Microsoft Safety Scanner found a threat (Threat detected: MonitoringTool:Win32/MicTrayDebugger) and removed (Found MonitoringTool:Win32/MicTrayDebugger and Removed!), it fixed for me. But I'm not sure :)

If you run Microsoft Safety Scanner, log file path C:\Windows\debug\msert.log

like image 105
Mecit Semerci Avatar answered Nov 15 '22 07:11

Mecit Semerci