[erlang-questions] supervisor not restarting gen_server

Robert Virding <>
Sun May 6 00:40:39 CEST 2012


----- Original Message -----
> On May 5, 2012, at 21:07 , Robert Virding wrote:
> 
> > A quick look seems to indicate that both a server and a supervisor,
> > cowboy_listener_sup, crashed. It was another supervisor,
> > cowboy_sup, which reports the death of cowboy_listener_sup. From
> > where is your gene_server started?
> 
> Since cowboy_sup received an exit signal of 'killed' from
> cowboy_listener_sup, doesn't that imply that it was (explicitly)
> killed with exit(Pid, kill)?

That is most definitely does. And if the supervisor was killed then that would also have killed the gen_server which would not be restarted as there was no supervisor. The question is then why that supervisor was not restarted by cowboy_sup? If it should have been,

Robert

> 
> >> I have a gen_server that seems to be crashing for some reason and
> >> the supservisor is not restarting it.  The child spec is
> >> one_for_one, permanent and the error log is below.  All i see is
> >> the crash report but no attempt at a restart.  Is there any way
> >> to figure out why the supervisor would not restart it?
> >> 
> >> 2012-05-02 14:54:28.776 [info]
> >> <0.889.0>@websocket_pubsubsrv:terminate:198 Shutting down pubsub
> >> server...
> >> 2012-05-02 14:54:28.776 [error] <0.882.0> Supervisor cowboy_sup
> >> had child {cowboy_listener_sup,my_http_listener} started with
> >> cowboy_listener_sup:start_link(100, cowboy_tcp_transport,
> >> [{port,8000}], cowboy_http_protocol,
> >> [{dispatch,[{'_',[{[<<"multiplex">>,'...'],sockjs_cowboy_handler,{service,"/multiplex",sockjs_multiplex,...}},...]}]}])
> >> at <0.909.0> exit with reason killed in context child_terminated
> >> 2012-05-02 14:54:28.785 [error] <0.911.0> gen_server <0.911.0>
> >> terminated with reason: killed
> >> 2012-05-02 14:54:28.788 [error] <0.911.0> CRASH REPORT Process
> >> <0.911.0> with 1 neighbours crashed with reason:
> >> {killed,[{gen_server,terminate,6},{proc_lib,init_p_do_apply,3}]}
> >> 
> >> 
> >> Thanks
> >> -AD
> >> 
> >> _______________________________________________
> >> erlang-questions mailing list
> >> 
> >> http://erlang.org/mailman/listinfo/erlang-questions
> >> 
> > _______________________________________________
> > erlang-questions mailing list
> > 
> > http://erlang.org/mailman/listinfo/erlang-questions
> 
> 



More information about the erlang-questions mailing list