7

I have a pretty data heavy Node application. Besides common things like file uploading, the app also spawns detached (long running) child processes.

For an example, consider a user uploads a file and the detached process triggers a native tool installed on the system to do some heavy processing. This can take anywhere between a second and several minutes - therefore the process is detached and the user is notified within the web site (when online) or via email.

I'm considering to use pm2 as monitoring tool. It seems great, though how would I monitor individual detached child processes with it? I've read most of the docs and checked the code examples - but I didn't find an example for my particular problem.

Concrete config examples will be welcome, since I'm new to pm2.

benjist
  • 2,740
  • 3
  • 31
  • 58
  • I'm using pm2.launchBus() to create a socket between the parent and child process. There is very little documentation on launchBus() but it sounds like that is what you need. Did you ever find a solution? – mags Mar 07 '17 at 19:09

1 Answers1

1

As of November 2020, there is an open issue for this feature: https://github.com/Unitech/pm2/issues/1869

cub33
  • 598
  • 1
  • 4
  • 12