supervisor child stop but beam process still running

93 views
Skip to first unread message

br...@parkifi.com

unread,
Nov 22, 2015, 1:34:15 PM11/22/15
to elixir-lang-talk
Hello,
Is there any way to stop beam when a supervised application reaches max start and stops application?  I am looking for a good to monitor (on call alerts) the application.

Thanks,
Brad

T Ty

unread,
Nov 22, 2015, 4:07:13 PM11/22/15
to elixir-l...@googlegroups.com
Look into using -heart when starting Erlang

--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/4ca091ca-622e-48bb-a86b-d8898dac0a95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

br...@parkifi.com

unread,
Nov 22, 2015, 4:33:40 PM11/22/15
to elixir-lang-talk
thanks for the response but not sure that is what I am looking for.  I start the application with mix run --no-halt.  The problem is the supervisor stops the application after max_restarts while the beam VM stays running. This makes it hard to have a monitoring framework plugin to check whether your application "foo" is still running.

Thanks

Ben Wilson

unread,
Nov 22, 2015, 4:46:41 PM11/22/15
to elixir-lang-talk
Hey, I'm pretty sure the start_permanent option in your mix.exs config takes care of this, but by default it only runs in production mode. Can you confirm if MIX_ENV=prod mix run --no-halt exhibits the desired behaviour or not?

br...@parkifi.com

unread,
Nov 22, 2015, 5:07:14 PM11/22/15
to elixir-lang-talk
I double checked and one of the nodes was running without MIX_ENV=prod.  That might have done it.  I will know shortly as soon as our third party service has a blip again ;)

Thanks

Ben Wilson

unread,
Nov 22, 2015, 5:10:36 PM11/22/15
to elixir-l...@googlegroups.com
You should be able to check locally with a contrived error pretty easily.

--
You received this message because you are subscribed to a topic in the Google Groups "elixir-lang-talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elixir-lang-talk/NkKMvf2xgm0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elixir-lang-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/c2ff7e4f-28c9-45b1-82f8-e6bb10f2b0a0%40googlegroups.com.

br...@parkifi.com

unread,
Nov 22, 2015, 5:37:41 PM11/22/15
to elixir-lang-talk
15:36:41.848 [info]  Application foobar exited: shutdown
{"Kernel pid terminated",application_controller,"{application_terminated,foobar,shutdown}"}

Crash dump is being written to: erl_crash.dump...Abort trap: 6

That seems like what we want, no?

José Valim

unread,
Nov 23, 2015, 10:33:35 AM11/23/15
to elixir-l...@googlegroups.com
This is controlled by the start_permanent option which is true by default only in prod. You can either pass --permanent or change your mix.exs file. Setting --no-halt only asks the VM to continue running after booting the application.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/c2ff7e4f-28c9-45b1-82f8-e6bb10f2b0a0%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--


José Valim
Skype: jv.ptec
Founder and Director of R&D

br...@parkifi.com

unread,
Nov 23, 2015, 10:37:29 AM11/23/15
to elixir-lang-talk, jose....@plataformatec.com.br
Excellent; Thanks for the response and thanks to this awesome community =]


On Monday, November 23, 2015 at 8:33:35 AM UTC-7, José Valim wrote:
This is controlled by the start_permanent option which is true by default only in prod. You can either pass --permanent or change your mix.exs file. Setting --no-halt only asks the VM to continue running after booting the application.

On Sunday, November 22, 2015, <br...@parkifi.com> wrote:
I double checked and one of the nodes was running without MIX_ENV=prod.  That might have done it.  I will know shortly as soon as our third party service has a blip again ;)

Thanks

On Sunday, November 22, 2015 at 2:46:41 PM UTC-7, Ben Wilson wrote:
Hey, I'm pretty sure the start_permanent option in your mix.exs config takes care of this, but by default it only runs in production mode. Can you confirm if MIX_ENV=prod mix run --no-halt exhibits the desired behaviour or not?

On Sunday, November 22, 2015 at 4:33:40 PM UTC-5, br...@parkifi.com wrote:
thanks for the response but not sure that is what I am looking for.  I start the application with mix run --no-halt.  The problem is the supervisor stops the application after max_restarts while the beam VM stays running. This makes it hard to have a monitoring framework plugin to check whether your application "foo" is still running.

Thanks

On Sunday, November 22, 2015 at 2:07:13 PM UTC-7, TTy wrote:
Look into using -heart when starting Erlang

On Sun, Nov 22, 2015 at 6:34 PM, <br...@parkifi.com> wrote:
Hello,
Is there any way to stop beam when a supervised application reaches max start and stops application?  I am looking for a good to monitor (on call alerts) the application.

Thanks,
Brad

--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/4ca091ca-622e-48bb-a86b-d8898dac0a95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-talk+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages