[erlang-questions] supervisors & slow init's
Thu Dec 5 18:04:56 CET 2013
Make the supervisor use the 'rest_for_one' strategy and have A crash if the
connection fails. Then the supervisor will restart then entire subtree,
starting with A.
On Thu, Dec 5, 2013 at 10:39 AM, David Welton <davidnwelton@REDACTED>wrote:
> Rereading Ferd's article, this jumps out at me:
> > You could force a connection during initialization if you know the
> database is on the same host and should be booted before your Erlang
> system, for example. Then a restart should work. In case of something
> incomprehensible and unexpected that breaks these guarantees, the node will
> end up crashing, which is desirable: a pre-condition to starting your
> system hasn't been met. It's a system-wide assertion that failed.
> That's what we want! If the "A" system does not start, things should
> be retried a few times, then everything but a small core which will
> provide a "fail politely" (
> ) error message to the user should probably not start either. The
> system should not bring up "not really started B" and "not really
> started C" just to send them start messages (from where?) when A
> finally does start 20 seconds later.
> Incidentally, what's the best way to start this whole subtree so that
> a small core of the application will survive its death?
> David N. Welton
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions