EPMD Zombie when running PhxApp in a docker container

Running Phx application inside docker container, I get regularly attacked by an EPMD zombie. While I am generally aware of

for example, my understanding is that this still applies to misbehaving processes. OTOH I wouldn’t expect part of the core Erlang stuff to misbehave so maybe I am simply unaware of something that I should / should not do when running Phx (or generally Elixir/Erlang stuff) inside a container? Any clues?

Are you using EPMD for something? I think it is possible to start erlang runtime without using EPMD in newer versions.

Currently no. It’s still single-host, single-node environment. Not starting epmd at all if possible would help, although I’d prefer to understand the problem first

EPMD is not started as a child process of erlang node, instead the mode of working is that it gets started with the runtime if it was not already started and the process is responsible for finding and marking all the active nodes on the host. I can confirm that this is true even for more exotic platforms such as android, it is most probably something that stuck historically.

I can’t confirm for sure but I remember reading about erlang deciding to ditch epmd in favor of another discovery system.

In a release, you can set RELEASE_DISTRIBUTION=none and I think it won’t start EPMD.

1 Like

I read more erlang docs about EPMD and since i take it is run daemonised then most probably the

daemonised process scenario described (on nginx example) in the previously linked article kicks-in. Now… how do I start a releases based Phx application so that the runtime doesn’t spawn this daemon?

Hehe… race condition :wink: I’ll examine the suggestion, tnx

I confirmed yesterday – passing RELEASE_DISTRIBUTION=none to the container prevents said zombie from surfacing. In the longer run a proper solution needs to be devised though. Probably something along the “phusion” base docker image lines. Thanks for all answers