Nilcale
Nilcale

Reputation: 55

Zombie processes or something similar?

I have a phoenix app. From time to time I'll face situations like this:

$ ps aux
===>

user1    67297   0.0  0.2  13240  1860  -  S    Thu07       0:03.00 /usr/home/user1/my_projects/project1/erts-10.3.5.19/bin/epmd -daemon

Then I'll try to stop it

$ MIX_ENV=prod ./bin/project1 stop
--rpc-eval : RPC failed with reason :nodedown

Why does it say that it's down, first of all?

Nevertheless, it'll still remain up:

$ ps aux
===>

user1    67297   0.0  0.2  13240  1860  -  S    Thu07       0:03.00 /usr/home/user1/my_projects/project1/erts-10.3.5.19/bin/epmd -daemon

What's the matter?

P.S. generally, there're 3 or so processes that have to do with a project, although in my question there's only 1. In this case I've already killed 2 of them manually by "kill". However, this hasn't solved this issue.

Upvotes: 0

Views: 469

Answers (2)

John-Paul Bader
John-Paul Bader

Reputation: 321

If you are running this as a release, it could be either because the release cookie is not static and after a new deployment it has changed, or the release name is not properly configured.

In production I'd recommend setting the RELEASE_COOKIE env variable. As for the release name, you can make sure that it is set to something meaningful by checking the start args via ps auxwww. The beam.smp process should have an SNAME or NAME set.

In short, if you have a static release cookie and a static sname or name configured, then the rpc/epmd call should be able to find your running node.

Upvotes: 0

zwippie
zwippie

Reputation: 15515

That is the Erlang Port Mapper Daemon, a small name server used by Erlang/Elixir programs when establishing connections to other nodes.

The daemon is started automatically by command erl(1) if the node is to be distributed and no running instance is present.

So it's started automatically when you fire up your Phoenix app.

No need to kill that process, you can just keep it running.

Upvotes: 5

Related Questions