node.js – NodeJs server becoming unresponsive

I’m running a Node.js server using PM2 in cluster mode on a machine with 8 cores. Occasionally, the application becomes completely unresponsive—no logs, no responses, nothing.

I’ve integrated Prometheus and Grafana to monitor metrics, and I’ve observed that this issue occurs even without any spike in incoming traffic. In PM2’s monitoring (pm2 htop/monit), I see that when the server becomes unresponsive, one of the cores consistently hits 100% CPU usage, while the other cores remain at normal levels.

What could be causing one core to spike to 100% CPU, leading to the unresponsiveness of the application? How can I diagnose and resolve this issue?

Initially, I thought it was breaking under high traffic, but it turns out it breaks randomly regardless of the traffic , i have looked into the logs , since the server becomes unresponsive so there are no error logs .

Read more here: Source link