4 ms·
How did you manage that? We currently have a problem with crashing services using up all system resources trying to constantly restart. Or better yet, exponenti
by Spiritus 11y ago
How did you manage that? We currently have a problem with crashing services using up all system resources trying to constantly restart. Or better yet, exponential backoff.
- ploxiln 11y agoIn the recent past I worked at a place that used daemontools extensively. We used a wrapper shell script which would do the restart loop detection, then exec the actual process to run. If it detected X restarts in Y seconds (by echoing the unix timestamp to a restart log and checking it) it would "svc -d $(dirname $0)" (or something like that) and exit. We also had a monitoring service (nagios) that would check if any services "auto-downed" on any servers and alert us.
- kragen 11y agorunit services have not only a 'run' but also an optional 'finish' script. My 'finish' script says #!/bin/sh sleep 30 I agree that exponential backoff would be better.