诊断Meteor(Node.js)服务挂起

时间:2021-12-14 15:54:09

I have a Meteor (Node.js) app in production that keeps hanging unexplainably in production. I have put a number of log statements in the code, so I can see that it hangs on a certain method.

我有一个生产中的Meteor(Node.js)应用程序,在生产中无法解释。我在代码中放了一些日志语句,所以我可以看到它挂在某个方法上。

My question is if there are any other tools other that the console log that might give me insight into the resource consumption of a Node.js app. Something that might tell me why the app is hanging.

我的问题是,是否还有其他任何控制台日志工具可以让我深入了解Node.js应用程序的资源消耗。可能会告诉我为什么应用程序挂起的东西。

The method on which the server hangs is a method that uses a geocluster and geolib NPM. It usually happens after a method where the Facebook-node-SDK is called.

服务器挂起的方法是使用geocluster和geolib NPM的方法。它通常发生在调用Facebook-node-SDK的方法之后。

I am thinking that there might be memory consumption from the calls to the geo npm, or open http connections from the facebook-node-sdk?

我想从geo npm的调用可能会有内存消耗,或者从facebook-node-sdk打开http连接?

Please let me know if there is more information that I can provide. Any help would be appreciated.

如果有更多我可以提供的信息,请告诉我。任何帮助,将不胜感激。

2 个解决方案

#1


2  

You could try node-inspector and pass environment run vars to meteor via NODE_OPTIONS='--debug-brk' meteor run and try your luck there.

您可以尝试节点检查器并通过NODE_OPTIONS =' - debug-brk'流星运行将环境运行变量传递给流星并在那里试试运气。

(2017 update: there was an answer here referencing Kadira (kadira.io) however this service is no more.. sad).

(2017年更新:这里有一个答案引用Kadira(kadira.io)但是这项服务不再是......悲伤)。

You may also try the built-in NodeJS devtools available since 6.3. If you read the node-inspector github repo, you can see a blog post referenced there to get started:

您也可以尝试自6.3以来可用的内置NodeJS devtools。如果您阅读了node-inspector github repo,您​​可以看到在那里引用的博客帖子开始:

https://medium.com/@paul_irish/debugging-node-js-nightlies-with-chrome-devtools-7c4a1b95ae27#.pmqejrn8q

https://medium.com/@paul_irish/debugging-node-js-nightlies-with-chrome-devtools-7c4a1b95ae27#.pmqejrn8q

#2


1  

You can try Webstorm, version 9 has meteor support, debugging included.

你可以试试Webstorm,版本9有流星支持,包括调试。

#1


2  

You could try node-inspector and pass environment run vars to meteor via NODE_OPTIONS='--debug-brk' meteor run and try your luck there.

您可以尝试节点检查器并通过NODE_OPTIONS =' - debug-brk'流星运行将环境运行变量传递给流星并在那里试试运气。

(2017 update: there was an answer here referencing Kadira (kadira.io) however this service is no more.. sad).

(2017年更新:这里有一个答案引用Kadira(kadira.io)但是这项服务不再是......悲伤)。

You may also try the built-in NodeJS devtools available since 6.3. If you read the node-inspector github repo, you can see a blog post referenced there to get started:

您也可以尝试自6.3以来可用的内置NodeJS devtools。如果您阅读了node-inspector github repo,您​​可以看到在那里引用的博客帖子开始:

https://medium.com/@paul_irish/debugging-node-js-nightlies-with-chrome-devtools-7c4a1b95ae27#.pmqejrn8q

https://medium.com/@paul_irish/debugging-node-js-nightlies-with-chrome-devtools-7c4a1b95ae27#.pmqejrn8q

#2


1  

You can try Webstorm, version 9 has meteor support, debugging included.

你可以试试Webstorm,版本9有流星支持,包括调试。