Elixir Remote Console hangs

I can remote into my app, and also get iex running. I can even do small expressions, but if I try to call a very simple function in a module which works locally, it just hangs forever.

/ # /app/bin/myapp remote
Erlang/OTP 24 [erts-12.0.1] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [jit:no-native-stack]

Interactive Elixir (1.12.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(still-river-2877@fdaa:0:31ed:a7b:67:0:3642:2)1> 1 + 1
2
iex(still-river-2877@fdaa:0:31ed:a7b:67:0:3642:2)2> MyApp.TempUtils.
myfun/0
list_stuff/0

iex(still-river-2877@fdaa:0:31ed:a7b:67:0:3642:2)3> MyApp.TempUtils.list_stuff()
[hangs forever]

list_stuff is very simple. Something like:

    def list_stuff() do
        from(u in Model, where: is_nil(u.myfield))
        |> Repo.all()
    end

There is nothing in the logs.

Can anyone else get a module function to run remotely?

For posterity:
If I switch to the provided Wireguard connection, instead of my regular VPN, everything works as expected.

1 Like

Oh that’s interesting. Were you running a VPN inside your app?

Sorry, confusing wording there:
I was using ProtonVPN on my laptop, in Wireguard mode.
On the side I have the official Wireguard client, with the Fly.io setup, as described in the Getting Started guide.
I was on my Proton connection when the above issue happened. Turning that off, and turning on the Wireguard connection (with the Fly.io setup) solved it.
I don’t think this is a Fly.io issue, rather an “I crossed the beams, because I don’t know what I’m doing”-issue :slight_smile: