delayed child restart with incremental back-off

Nicolas Martyanoff khaelin@REDACTED
Mon May 3 13:03:54 CEST 2021

Maria Scott <maria-12648430@REDACTED> writes:

> I have only read the comment (4) explaining the delay behavior in supervisor2,
> and I guess it does things a bit different from what the OP seems to ask for.
> Specifically, it says that when a child exceeds the restart limit, another
> restart attempt will be delayed instead of the supervisor shutting down. What
> the OP asks for, if I understand correctly, is delays between restart attempts
> in general (right?)
The two points I believe are important are:

1. Adding an optional delay before restarting a child that died
(exponential backoff would be better, ferd has a nice library
demonstrating how to do it right). Because filling log files really does
not help (and this is not the worse consequence).

2. Adding an option to always restart, without any limit, because
aborting the entire program is a huge problem.

>> > In general, if I could, I would use restart delays with exponential
>> > backoff everywhere because in practice, restarting immediately is almost
>> > never the right approach: code errors do not disappear when restarting
> They won't disappear after a delay, either. Just saying ;)
No they will not. But the last thing I want is my entire server going
down because a specific context appears that results in recurrent errors
in a non-essential component.

Nicolas Martyanoff

More information about the erlang-questions mailing list