[erlang-questions] Stopping of Erlang app hangs when mnesia stopped from within the program

Ken Robinson <>
Thu Aug 19 16:29:53 CEST 2010


Whoops, forget to send it to the erlang list. Boot file worked.
Ken.

On Fri, Aug 20, 2010 at 12:27 AM, Ken Robinson
<> wrote:
> Hi Mazen,
> I used a boot file as you suggested and it worked fine. many thanks
> Ken.
>
> On Sat, Aug 14, 2010 at 2:32 AM, Mazen Harake
> <> wrote:
>>  The application controller is already busy trying to stop your app, when
>> you do mnesia:stop() I suspect it is trying to call the application
>> controller to stop it but the application controller is already busy trying
>> to stop your app, when you do mnesia:stop() I suspect it is trying to call
>> the application controller to stop it but the application controller is
>> already busy trying to stop your app.
>>
>> :)
>>
>> Use a boot file to handle startup of your applications or a function which
>> starts mnesia and then starts your app (and the reverse in a stop function).
>>
>>> Should I not use these prototype functions within a fully fledged erlang
>>> app?
>> No you shouldn't
>>
>> /Mazen
>>
>> On 13/08/2010 17:02, Ken Robinson wrote:
>>>
>>> Hi all,
>>>
>>> I've run into a problem where I cannot stop mnesia within my program
>>> without causing the app to hang.
>>>
>>> I'm presently doing prototyping of mnesia within my erlang app.
>>>
>>> In my jaus_app.erl file the start() calls:
>>>
>>> {atomic, ok} = mnesia:load_textfile("priv/mnesia_prototype.txt")
>>>
>>> My stop() function calls:
>>>
>>> mnesia:dump_to_textfile("priv/mnesia_prototype_res.txt"),
>>> mnesia:stop(),
>>>
>>> When I comment out these lines and start and stop mnesia from the
>>> erlang prompt, I am able to stop my application cleanly.
>>>
>>> Should I not use these prototype functions within a fully fledged erlang
>>> app?
>>>
>>> Ken.
>>>
>>> ________________________________________________________________
>>> erlang-questions (at) erlang.org mailing list.
>>> See http://www.erlang.org/faq.html
>>> To unsubscribe; mailto:
>>>
>>
>>
>


More information about the erlang-questions mailing list