Jump to content

Recommended Posts

Posted

The Account Load always shows that the memory and CPU usage are very high,but I have stopped the node service and did not run other applications. I think it is a bug. Please help me solve it. You can reset my host if necessary. Thank you.

Posted

Node really uses that many resources, and it's the second leading cause of suspension behind Wordpress. It is extremely inefficient.

It is worth noting that if you noticed a spike specifically in the memory numbers in the past day or so for a program that has worked previously, the memory calculations were recently updated to more accurately reflect memory usage. This was the result of a user who managed to almost crash the server, and the new calculations will reflect as an increase in memory usage for users with long-running programs like Node and Python. PHP users are less likely to be affected by the changes because PHP both exits after each page is loaded, and times out after a minute or so if it doesn't finish.

Posted
1 hour ago, wolstech said:

Node really uses that many resources, and it's the second leading cause of suspension behind Wordpress. It is extremely inefficient.

It is worth noting that if you noticed a spike specifically in the memory numbers in the past day or so for a program that has worked previously, the memory calculations were recently updated to more accurately reflect memory usage. This was the result of a user who managed to almost crash the server, and the new calculations will reflect as an increase in memory usage for users with long-running programs like Node and Python. PHP users are less likely to be affected by the changes because PHP both exits after each page is loaded, and times out after a minute or so if it doesn't finish.

image.png.4e45d95195972b4b4f72b3b2fbdd085b.png

It has been restored now, but as you can see from the picture, after I found that the usage was high and disabled the app, the peak still lasted for seven or eight hours. Isn't this a bit strange?

Posted

It looks like you started these two processes

npm run start
node index.js

and they were running up until 2 hours ago. When you start processes that never exit they ... never exit. If you want to run a Node.js website we strongly recommend following the guide that we wrote https://wiki.helionet.org/tutorials/node.js It uses Passenger which means if you don't get any page hits for 5-10 minutes your Node.js processes are killed and when someone views your website again they are started again. Unless you are getting constant visitors to your website every few minutes it will save you massive amounts of memory usage. If you follow some random Node.js guide on the internet they will most likely tell you to run a command like the above that never exits, and you will most likely end up suspended.

If you didn't run the above commands then you should change your password because someone else has access to your account.

Posted
9 hours ago, Krydos said:

看起来您启动了这两个进程



		

并且它们一直运行到 2 小时前。当你启动永不退出的进程时,它们...永远不会退出。如果你想运行一个 Node.js 网站,我们强烈建议你遵循我们编写的指南 https://wiki.helionet.org/tutorials/node.js 它使用 Passenger,这意味着如果你在 5-10 分钟内没有任何页面点击,你的 Node.js 进程将被终止,当有人再次查看你的网站时,它们会重新启动。除非你的网站每隔几分钟就会有固定的访问者,否则它将为你节省大量的内存使用量。如果你在互联网上随意遵循一些 Node.js 指南,他们很可能会告诉你运行一个永不退出的上述命令,并且你很可能会被暂停。

如果您没有运行上述命令,那么您应该更改密码,因为其他人可以访问您的帐户。

I run these commands just to check the results, because usually if there are control. log and exceptions, they will be output in the terminal. Because I could see the 'run script' button on Plesk, I thought it was feasible. I didn't know if these commands were the cause of the problem, and I hadn't done any research on because I couldn't see the currently running process, so I had to seek your help. By the way, "If I start a Node process that never ends on its own how do I stop it?"

  • Krydos locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...