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

vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
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
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
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
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

We're in Beta

About us Mission Statement