Skip to content

epmd monitor consumes one full CPU core on Windows #3162

Answered by michaelklishin
xjlixd asked this question in Other
Discussion options

You must be logged in to vote

Here are some relevant functions. They start a subprocess VM that would start epmd. This is necessary because on some operating systems, epmd can be terminated in certain cases without RabbitMQ being notified this in any way. IIRC
on Windows, a logout of the effective user would lead to this.

So here's how epmd is kept running periodically:

ensure_epmd() ->
    Exe = rabbit_runtime:get_erl_path(),
    ID = rabbit_misc:random(1000000000),
    Port = open_port(
             {spawn_executable, Exe},
             [{args, ["-boot", "no_dot_erlang",
                      "-sname", rabbit_misc:format("epmd-starter-~b", [ID]),
                      "-noinput", "-s", "erlang", "halt"]},
          …

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@xjlixd
Comment options

Comment options

You must be logged in to vote
6 replies
@michaelklishin
Comment options

@michaelklishin
Comment options

@xjlixd
Comment options

@xjlixd
Comment options

@michaelklishin
Comment options

Answer selected by michaelklishin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3161 on June 30, 2021 10:23.