anuaralfetahe
Killing the Cachex process crashes the entire application
Hello I’m having hard time finding out whats the problem here.
I was trying to test the supervision tree by killing the child processes until I found something interesting.
Killing the Cachex process(using :observer.start tool) crashes the entire application.
I have elixir application and under the application supervision tree I start the Cachex process.
I can kill other processes with no problem and they all start up again except the Cachex process.
I am afraid if the Cachex process dies it will sink the whole ship.
It’s umbrella project if that makes any difference. Cachex version is: 3.4.0
defmodule Streamer.Application do
use Application
@impl Application
@spec start(any, any) :: {:error, any} | {:ok, pid}
def start(_type, _args) do
children = [
{Cachex, :misc}
]
opts = [strategy: :one_for_one, name: Streamer.Supervisor]
Supervisor.start_link(children, opts)
end
end
Thanks for anybody replying!
Marked As Solved
anuaralfetahe
Was my fault and Cachex seems to work as expected.
I was closing the Cachex process with the :kill signal not with the :shutdown signal.
Pretty much force killing the Cachex process along with the ETS table which took down the whole application.
Also Liked
03juan
@anuaralfetahe glad you found it. Note to self, don’t :kill anything connected to ETS…
That’s a good lesson in understanding the guts of the BEAM and how things are interconnected, thanks for sharing your learning.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








