没有流量进入时,节点事件循环被阻止

时间:2016-05-30 02:54:58

标签: javascript node.js express

我有一些奇怪的事件循环行为,即使没有发生任何事情,我的事件循环也会被阻止。我在AWS Elastic Bean Stalk上运行了一个Node(4.4.3)Express(4.1.3)应用程序。我正在使用https://github.com/winstonjs/winston来观看所有请求。The GET / 200是我的健康检查员。

在大约15:39,事件循环被阻止,但正如您所看到的,从进入的请求中,唯一发生的是调用运行状况检查器路由,该路由返回静态路由。使用https://github.com/tj/node-blocked

生成Blocked
Sun May 29 2016 15:38:16 GMT+0000 (UTC) - info: GET / 200 1ms
Sun May 29 2016 15:38:20 GMT+0000 (UTC) - info: GET / 200 2ms
Sun May 29 2016 15:38:26 GMT+0000 (UTC) - info: GET / 200 2ms
Sun May 29 2016 15:38:30 GMT+0000 (UTC) - info: GET / 200 1ms
Sun May 29 2016 15:38:36 GMT+0000 (UTC) - info: GET / 200 1ms
Sun May 29 2016 15:38:40 GMT+0000 (UTC) - info: GET / 200 1ms
Sun May 29 2016 15:38:46 GMT+0000 (UTC) - info: GET / 200 1ms
Sun May 29 2016 15:38:50 GMT+0000 (UTC) - info: GET / 200 2ms
Sun May 29 2016 15:38:56 GMT+0000 (UTC) - info: GET / 200 1ms
Sun May 29 2016 15:39:00 GMT+0000 (UTC) - info: GET / 200 1ms
Blocked 14 ms
Blocked 82 ms
Sun May 29 2016 15:39:06 GMT+0000 (UTC) - info: GET / 200 2ms
Sun May 29 2016 15:39:10 GMT+0000 (UTC) - info: GET / 200 1ms
Sun May 29 2016 15:39:16 GMT+0000 (UTC) - info: GET / 200 1ms
Sun May 29 2016 15:39:20 GMT+0000 (UTC) - info: GET / 200 1ms
Sun May 29 2016 15:39:26 GMT+0000 (UTC) - info: GET / 200 1ms
Sun May 29 2016 15:39:30 GMT+0000 (UTC) - info: GET / 200 1ms
Sun May 29 2016 15:39:36 GMT+0000 (UTC) - info: GET / 200 2ms
Sun May 29 2016 15:39:40 GMT+0000 (UTC) - info: GET / 200 1ms
Sun May 29 2016 15:39:46 GMT+0000 (UTC) - info: GET / 200 1ms
Sun May 29 2016 15:39:50 GMT+0000 (UTC) - info: GET / 200 2ms

我也在运行--trace_gc,我很确定它不是由于垃圾收集。我正在使用几个node_modules,https://gist.github.com/foobar8675/00a63b9c67cc18e30a58968742aba40d,但没有什么不同寻常的(我知道)如果有人有任何想法,我们非常感激。

0 个答案:

没有答案