peoj

peoj

Debugging supervision tree

I’ve built a supervision tree and I’m testing it out using observer (via :observer.start()).

I’m finding that performing Process.exit(one_of_the_child_pids, :kill) is unexpectedly also causing the supervisor itself to restart. Assuming that the observer processes GUI is giving me a complete picture of process links, which I assume it must be, I don’t see any way that this could be the case. I’ve experimented with passing silly values to max_restarts in the Supervisor but ultimately I’m stabbing in the dark here.

I’m absolutely certain this is down to some lack of understanding on my part. My question is; what’s the best way of determining why a supervisor has exited and/or debugging this sort of problem? Are there any good debug tools available?

Most Liked

peoj

peoj

Thanks @dimitarvp . I concur but I haven’t had a lightbulb moment. Maybe there are some tools / tips / tricks for tracing supervision tree events that I’m not aware of?

Here’s the library in question: elixir-mongodb-driver/lib/mongo.ex at master · zookzook/elixir-mongodb-driver · GitHub

Where Next?

Popular in Questions Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
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
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 130579 1222
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
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44167 214
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