它说在
Node.js about page:
Node exits the event loop when there are no more callbacks to perform.
有没有办法找出哪些回调使节点退出?
解决方法
你可以使用process._getActiveHandles()和process._getActiveRequests()
请参阅node.js邮件列表中的this discussion。
更新:有一个很好的包 – https://github.com/mafintosh/why-is-node-running