[erlang-questions] How to make a supervisor wait before restarting children
Wed Sep 12 12:36:15 CEST 2012
I agree with Loic's advice.
Lobbying for a change of the supervisor semantics is not likely
to produce tangible (esp. short-term) results, and for good reason.
The supervisor behaviour is so central, that even subtle changes
in semantics can have serious unintended consequences.
FWIW, I have lobbied for changes myself in the past, see e.g.
On 12 Sep 2012, at 11:58, Florian Odronitz wrote:
> Hi List,
> I am writing an application to talk to a database server. The supervisor starts a bunch of workers which connect to the db.
> When the db is not available, the workers crash and are restarted by the backend. If the workers crash too often, the supervisor dies according to the restart strategy. When the db comes up again after a couple of minutes, the supervisor is long dead.
> What I would like to achieve is a (super)supervisor that waits for a couple of seconds before restarting workers (or supervisor). The restart strategy does not offer such an option.
> Do you have any idea how to do this?
> erlang-questions mailing list
Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.
More information about the erlang-questions