Track individual child processes with pm2

I have a rather heavy Node application. In addition to the usual things, such as downloading files, the application also generates separate (long-running) child processes.

As an example, consider how a user downloads a file, and a disconnected process launches its own tool installed in the system to perform heavy processing. This can take from two to several minutes, so the process is disconnected and the user is notified on the website (online) or by email.

I am considering using pm2 as a monitoring tool. It seems healthy, although how can I control individual separate child processes with it? I read most of the documents and checked the code examples, but I did not find an example for my specific problem.

Specific configuration examples will be appreciated since I am new to pm2.

+5
source share

Source: https://habr.com/ru/post/1259693/


All Articles