[erlang-questions] Supervisor does not restart Gen Server

Gurgen Tumanian tumanian@REDACTED
Tue Feb 20 13:41:02 CET 2007

Hello everybody.

In my application i have a set of gen_servers orginized in a simple one
level supervision tree, with  one superviser above all.  Now the problem
that i have , is that once one of my gen_servers is crashed, the supervisor
does not restart it, and what is even worse - dies himself.
I have simplified the problem, creating a simple gen server in which a
badarith can be initiated(divide by zero)  and a
simple supervisor, which should have restarted it in case of crash by
one_to_one strategy.

now when starting the supervisor, and then calling the zuzu:do(0) (causing
the badmatch)
i get the crash of the worker gen_serv, and then the supervisor
crashes.Supervior's crash report is
=CRASH REPORT==== 20-Feb-2007::16:35:12 ===
    pid: <0.41.0>
    registered_name: []
    error_info: {{badarith,[{zuzu,handle_call,3},
    initial_call: {gen,init_it,
    ancestors: [<0.39.0>]
    messages: []
    links: []
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 233
    stack_size: 21
    reductions: 227

I get the feeling that the supervisor dies as it pasess the restart limit,
but that's a quite surprise for me, as the first start of the worker proc
pases normally.
I will be greatfull for any advice on this issue.

Gurgen Tumanyan, Smart Tech
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070220/e35f9318/attachment.htm>

More information about the erlang-questions mailing list