[erlang-questions] otp/supervisor immediately goes to "shutdown"

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Tue Mar 8 12:23:41 CET 2011


On Tue, Mar 8, 2011 at 11:50, Nick S <nick.sfx.1@REDACTED> wrote:
> Hi,
>
> Just hoping to get some help on my query
>
> http://forum.trapexit.org/viewtopic.php?t=19641

Your problem is probably that your start_link/1 code in the db module
is written as:

start_link([S]) ->

where you should have written

start_link(S) ->

as the list is "unpacked" in the supervisor (probably due to an
apply/3 form). The way you can see this is to up your debugging
information on the system. Eventually boot with SASL enabled, and also
look at the spawn options, notably the debug tracing (see gen_server
and sys module descriptions for enabling this). My guess is though
that in this case, SASL is enough as you will probably be hitting a
function_clause error when the supervisor tries to call (the
equivalent of apply(db, start_link, [S]).



-- 
J.


More information about the erlang-questions mailing list