ioBroker.js-controller
ioBroker.js-controller copied to clipboard
Restart of an Adapter/Objectchange do not wait till old process really ended in all cases
When an adapter "hangs" on exit (or do not react on sigKill signal and also do not end when process.kill is called then a new process is started after the object change after "stopTimeout+2500ms" without really considering that the old process formally is still running.
Todo here:
- Check the whole "procs[id|.process" handling and especiylly deletion to make sure we always have the process object and not delete too early
- make sure 100% that procs[id|.process is cleared when process exosts and try to find out if there are cases where the "on(exit)" is not called for a process
- check the usage of procs[id|.stopping and add handling for "startInstance delays or retries" for these cases of a non-responding stop of adapter process
- think about failbacks (maybe add https://www.npmjs.com/package/find-process to actively vheck if process is still running ?)