简体   繁体   English

Node.exe卡在100%CPU

[英]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. 我有一个ExpressJS node.js应用程序在Windows Server 2016 VM上的IISNode上运行,具有4个内核和32GB内存。 I am able to set one process per core, so I have 4 node.exe's running for my app. 我能够为每个核心设置一个进程,所以我有4个node.exe正在运行我的应用程序。 Node version is v6.10.3. 节点版本是v6.10.3。

This is what the resources normally look like: 这是资源通常的样子:

我的正常运行流程

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. 但是,我试图找到其中一个进程的原因,以达到100%的CPU利用率。 Whenever this occurs, I am forced to kill the node.exe because my entire application stalls. 每当发生这种情况时,我都被迫杀死node.exe,因为我的整个应用程序都停止了。 It will sit stalled at peak CPU, and all further requests are then spinning. 它会在CPU峰值时停滞不前,然后所有进一步的请求都会旋转。

  1. What can causes high CPU utilization in the node.exe and how can it be locked at 100%? 什么可能导致node.exe中的高CPU利用率,如何将其锁定在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? 可以使用哪些工具来确定node.exe停止运行以更好地调试我的应用程序?
  3. Should IISNode be working as a load balancer and delegating all requests toward another core? IISNode应该作为负载均衡器工作并将所有请求委托给另一个核心吗?

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! 我很欣赏任何见解!

I got same problem in my Windows 10. Open Task manager > Processes Nodejs: Server-side JavaScript(32 bit) was using %70 CPU. 我在Windows 10中遇到了同样的问题。打开任务管理器>进程Nodejs:服务器端JavaScript(32位)正在使用%70 CPU。 I found that article . 我发现那篇文章

I used Microsoft Safety Scanner . 我使用过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. Microsoft Safety Scanner发现了一个威胁(检测到威胁:MonitoringTool:Win32 / MicTrayDebugger)并删除了(Found MonitoringTool:Win32 / MicTrayDebugger和Removed!) ,它为我修复了。 But I'm not sure :) 但我不确定:)

If you run Microsoft Safety Scanner, log file path C:\\Windows\\debug\\msert.log 如果您运行Microsoft安全扫描程序,请记录文件路径C:\\ Windows \\ debug \\ msert.log

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM