[erlang-questions] Supervisor gets killed if a worker is killed

Ryan Zezeski rzezeski@REDACTED
Sat Sep 18 07:24:25 CEST 2010

On Fri, Sep 17, 2010 at 5:52 PM, Tushar Deshpande

> The worker process performed as expected.  But, when
> I killed the worker using Appmon, I observed that the
> supervisor too was killed.  Why did it happen?
> Here's the childspec for the worker process
> {hsr_server, {hsr_server, start_link, []}, permanent, 2000, worker,
> [hsr_server]}
> hsr_server is the worker process
In this case, the more important thing is your supervisor spec.  I'm
guessing the maximum restarts is set to 0.  After the first restart the
supervisor will have reached it's restart threshold, kill all worker
processes and then itself.



More information about the erlang-questions mailing list