Trouble trying to start etop in production


I’m trying to run :etop.start after entering a remote iex session in production to troubleshoot high memory usage in my application, but it seems that I can’t include the tool with my release.

Trying to run etop gives me a module :etop is not available error message and adding :etop to :extra_applications gives me ** (Mix) Could not start application etop: could not find application file: when I start the app locally.

I have no trouble starting etop locally in an iex session though.

I have Erlang/OTP 23 and Elixir Elixir 1.10.4 in my machine, while in production I have a Docker image that runs with Erlang/OTP 22 and Elixir 1.10.3.

1 Like

Hi @thiagomajesk, it seems the module is Etop instead?

Hi @rodrigues… This is not the version that comes with Erlang though.
I’m talking about this built-in functionality:

Ah ok, TIL :sweat_smile:

Didn’t try this myself (locally etop just works), just found in stackoverflow that maybe adding :runtime_tools and :observer (?) to :extra_applications can help.

And that there’s also the etop CLI tool that might be able circumvent this if the target node doesn’t have the extra applications: etop -node testnode@myhost -setcookie MyCookie

Hi, again @rodrigues

Phoenix by default already includes :runtime_tools on :extra_applications, but this is not enough to enable observable or etop (don’t know why). I haven’t tried using the etop CLI though.