bosco icon indicating copy to clipboard operation
bosco copied to clipboard

When a service fails to start, bosco/pm2/whatever will restart it forever using 100% cpu

Open bettiolo opened this issue 8 years ago • 6 comments

Prevent this from happening and report an error.

bettiolo avatar Sep 16 '16 15:09 bettiolo

Yeah, I think it may be cluster that's doing it.

geophree avatar Sep 16 '16 16:09 geophree

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?

gabceb avatar Sep 16 '16 16:09 gabceb

cluster should have a sane retry policy that would not respawn every millisecond a service forever?

bettiolo avatar Sep 16 '16 16:09 bettiolo

You can configure cluster to start 1 worker locally and retry once.

cliftonc avatar Sep 16 '16 17:09 cliftonc

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.

cliftonc avatar Sep 26 '16 09:09 cliftonc

10 is OK, infinite is bad.

bettiolo avatar Sep 26 '16 11:09 bettiolo