pm2 is killing detached child processes on watch restart (ie which have been spawned with detached:true, stdio:'ignore', and child.unref().
Is there a way of telling pm2 not to kill the tree of child processes on restart?
The answer was to put the following in the ecosystem file (main section for app, not under the watch settings):
"treekill": false