Query about the event loop of Nodejs

It is well known that Nodejs is handling all events in the background loop. But how can I monitor all the active events and is it potential risk of out of memory or dead lock?

  • Monitor events:

You can write a log on each event. If you need more, store them into a database.

  • Potential risk of out of memory:

Monitor the memory usage of your node process while doing tests. Do stress/load test with ApacheBench (or Node!). In depth: Debugging node.js memory leaks

  • Dead lock:

I think you are on your own for this one.