BitGonzo

BitGonzo

How to tell if an elixir app is running from outside of the system?

I’m in the process of deploying an Elixir app to a kube cluster. For those who haven’t played with kube, it has the concept of a liveness and readiness probe which it uses to monitor service state and start/restart/backoff as necessary.

This is easy to setup for a Phoenix app because I access routes over HTTP, but the app I’m now deploying is a simple worker with a simple supervisor, no server, etc,.

I’ve looked at pid_file hex package which seems to be the way to go, but just wondering if anyone has experience with this and if it is reliable, or if there other suggestions for how I might go about this?

Found here:

Marked As Solved

idi527

idi527

How can I crash the beam? I think I need to find out.

If the top supervisor stops (the application stops), the vm should stop as well, I think.

If there are several applications in a release, I don’t quite remember.

Also Liked

idi527

idi527

Shouldn’t it be automatic if you use releases with docker? The app dies, the docker container stops, the pod is restarted, etc.

BitGonzo

BitGonzo

Confirmed. If Erlang crashes it brings the container down which will then adhere to its restart policy. Couldn’t bring down the main process (pid 1) from within container, but did manage to kill erl_child_setup. Cheers :+1:

Where Next?

Popular in Questions Top

joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement