How can I get a list of callbacks in the Node work queue? (or, Why won’t Node exit?)

You can use process._getActiveHandles() and process._getActiveRequests()

See this discussion in node.js mailing list.

update: there is a good package for this – https://github.com/mafintosh/why-is-node-running

Leave a Comment