Rodeoclash
I have an odd problem with a GenServer receiving a :DOWN message when I’m not expecting it. The GenServer itself is responsible for polling an external service every n number of minutes and making sure that I have a matching monitored process in my Elixir app. The file itself can be viewed here:
It is started in my application.ex using worker(App.KubernetesV2.Monitor, []).
Every now and again it will receive a message similar to: {:DOWN, #Reference<0.3921202181.3305373697.88131>, :process, #PID<0.7999.9>, :normal}. From my reading, this message should be sent when a process monitored has crashed or otherwise gone down. My question is, why is this server receiving the message? As far as I can tell, it shouldn’t be monitoring anything.
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex










Showing Posts 1 to 4- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
david_ex
That depends on what you mean by “otherwise gone done”: a
:DOWNmessage is sent when the monitored/supervised process exits. It’s important to realize that the exit message will also be sent when a process exits normally (i.e. NOT having crashed), which is what is happening in your example: the:normalreason indicates that the process has exited “successfully”.Basically, for what you’re attempting to do, you need to match the
:DOWNmessages in thehandle_info: only report the exit reasons that aren’t:normal(if that’s indeed what you’re aiming for).Rodeoclash
Sorry, that was a silly typo. It should be “gone down”.
I’m more curious about why I might be getting the message at all, rather than trying to match on it and handle it. Another bug I’ve been working through might be related to this. If an HTTPoison (or other process) launched from this GenServer crashes, could I expect the
:DOWNmessage to originate from that?david_ex
Let’s quickly recap what
:DOWNmessages are and how they work, just to make sure there’s no confusion there.A given process will typically receive a
:DOWNmessage because:Notice that the condition for getting a
:DOWNmessage is simply “process exited” and NOT “process crashed”.Now that that’s out of the way, let’s go over some points in your post that may help you debug.
You were either monitoring the process, or were linked to it while trapping exits. As far as I can tell, you’re not trapping exits in the GenServer, therefore the
:DOWNmessage is likely due to a monitored process exiting.Usually, if you’re interested n
:DOWNmessages, you’ll match on them, because in most cases you want to run different logic if the downed process exited normally or if it crashed (e.g. you typically don’t want to report successful exits to crash reporting services). Since receiving a:DOWNmessage only tells you that a process has exited, you need to match on the reason value (i.e.:normalin the message you posted) to determine whether the exit was due to a crash or not.No: it would send a
:DOWNmessage, but not the one you posted. The posted one has a:normalexit reason, therefore it wasn’t due to a process crashing.Hope this helps!
Rodeoclash
Ok, well the recap certainly helps and has given me something to think about, thanks @david_ex. I’m still unsure how I could be monitoring or linking a process in that GenServer code but it’s given me a starting point!