[erlang-questions] How to make a supervisor wait before restarting children
Florian Odronitz
odo@REDACTED
Wed Sep 12 11:58:41 CEST 2012
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
More information about the erlang-questions
mailing list