[erlang-questions] How to make a supervisor wait before restarting children

Florian Odronitz odo@REDACTED
Wed Sep 12 14:00:29 CEST 2012


> I agree with Loic's advice.
Yes, it makes perfect sense.

> Lobbying for a change of the supervisor semantics is not likely 
> to produce tangible (esp. short-term) results
I didn't even mean to lobby 8)

> 
> 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?
>> 
>> Thanks,
>> Florian
>> 
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
> 
> Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.
> http://feuerlabs.com
> 
> 
> 




More information about the erlang-questions mailing list