bosco
bosco copied to clipboard
When a service fails to start, bosco/pm2/whatever will restart it forever using 100% cpu
Prevent this from happening and report an error.
Yeah, I think it may be cluster
that's doing it.
Maybe we should drop 'cluster' for local devlopment and let services crash on start so 'bosco ps' is accurate on whats working and whats not working?
cluster should have a sane retry policy that would not respawn every millisecond a service forever?
You can configure cluster to start 1 worker locally and retry once.
The default cluster retry policy at TES is 10:
https://github.com/tes/module-tsl-cluster/blob/master/index.js#L37
You can over-ride it on a per service level. Given that this is our module, I'm tempted to have it understand the environment it is in and have it default to 0 locally.
10 is OK, infinite is bad.