delayed child restart with incremental back-off
Sun May 2 21:27:28 CEST 2021
I have not looked at the patch, but something like this would be good to
have. Then we could get rid of supervisor2 in RabbitMQ (
for the delay part, non-backoff in our case ).
I was going to see if Maria/Jan had interest in providing a patch for
this as well, so I'm glad that there's others showing interest.
On 02/05/2021 21:00, Nicolas Martyanoff wrote:
> I originally posted this email on erlang-patches, but I just realized
> most developers are on erlang-questions instead. I believe this could be
> of interest.
> Nine years ago, an interesting patch  was submitted by Richard Carlsson
> allowing to delay the re-creation of failed children in supervisors.
> After a quick discussions, the official answer was that the OTP team
> would discuss about it . There is no further message on the mailing
> Was there an official response ?
> I have various supervisors whose children handle network connections.
> When something goes wrong with the connection, children die and are
> immediately restarted. Most of the times, errors are transient (remote
> server restarting, temporary network issue, etc.), but retrying without
> any delay is pretty much guaranteed to fail again. And of course after a
> few retries, the application dies which is unacceptable.
> This kind of behaviour is a huge problem: it fills logs with multiple
> copies of identical errors and causes a system failure.
> 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
> so they are going to get triggered again immediately, and external errors
> are not magically fixed by retrying without any delay.
> Is there still interest for this patch ?
>  https://erlang.org/pipermail/erlang-patches/2012-January/002575.html
>  https://erlang.org/pipermail/erlang-patches/2012-January/002597.html
More information about the erlang-questions