supervisor:restart_child/2 (throttling)

Sean Hinde Sean.Hinde@REDACTED
Sun Feb 25 22:43:30 CET 2001


> Suppose a supervised server tries to acquire some resource when it
> starts, and crashes or terminates if it can't. If the resource is
> unavailable, we don't really want the child to be shut down with
> reached_max_restart_intensity.  The child can avoid this by waiting
> for a fixed time on startup or before crashing, but then the
> availability of the server would be less than optimal (if the child
> has been running correctly for some time, we should try to restart it
> immediately, and begin to delay the restarts only if it keeps 
> crashing).

I'd definitely support this. I find I re-write this sort of functionality
quite often and it would be nice to have it formalised into the supervisor
behaviour. e.g. my erpc thing posted recently uses timers to retry a tcp/ip
connection every few seconds. It would have been very nice to just use
supervisor.

This would go hand in hand with having an 'infinity' retries option as
discussed last year some time on the list.

 -Sean



NOTICE AND DISCLAIMER:
This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.




More information about the erlang-questions mailing list