I’m having an odd problem I don’t know how to debug. I have everything working smoothly in my dev environment, but after (my first, for this app) production build I couldn’t connect to the app. So I dig a little, and check :sys.get_status Myapp.Endpoint.Server
as I normally would, but I get errors in the production console:
iex(myapp@127.0.0.1)1> :sys.get_status Myapp.Endpoint.Server
** (exit) exited in: :sys.get_status(Myapp.Endpoint.Server)
** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
(stdlib) sys.erl:303: :sys.send_system_msg/2
but no errors in dev:
:sys.get_status Myapp.Endpoint.Server
{:status, #PID<0.348.0>, {:module, :gen_server},
[["$initial_call": {:supervisor, Phoenix.Endpoint.Server, 1},
"$ancestors": [Myapp.Endpoint, Myapp.Supervisor, #PID<0.320.0>]], :running,
#PID<0.335.0>, [],
[header: 'Status for generic server Elixir.Myapp.Endpoint.Server',
data: [{'Status', :running}, {'Parent', #PID<0.335.0>},
{'Logged events', []}],
data: [{'State',
{:state, {:local, Myapp.Endpoint.Server}, :one_for_one,
[{:child, #PID<0.349.0>, {:ranch_listener_sup, Myapp.Endpoint.HTTP},
{Phoenix.Endpoint.CowboyHandler, :start_link,
[:http, Myapp.Endpoint,
{:ranch_listener_sup, :start_link,
[Myapp.Endpoint.HTTP, 100, :ranch_tcp,
[max_connections: 16384, port: 4000], :cowboy_protocol,
[env: [dispatch: [{:_, [],
[{["phoenix", "live_reload", "socket", "longpoll"], [],
Plug.Adapters.Cowboy.Handler,
{Phoenix.Transports.LongPoll,
{Myapp.Endpoint, Phoenix.LiveReloader.Socket, :longpoll}}},
{["phoenix", "live_reload", "socket", "websocket"], [],
Phoenix.Endpoint.CowboyWebSocket,
{Phoenix.Transports.WebSocket,
{Myapp.Endpoint, Phoenix.LiveReloader.Socket, :websocket}}},
{["socket", "websocket"], [], Phoenix.Endpoint.CowboyWebSocket,
{Phoenix.Transports.WebSocket,
{Myapp.Endpoint, Myapp.UserSocket, :websocket}}},
{:_, [], Plug.Adapters.Cowboy.Handler,
{Myapp.Endpoint, []}}]}]]]]}]}, :permanent, :infinity,
:supervisor, [:ranch_listener_sup]}], :undefined, 3, 5, [], 0,
Phoenix.Endpoint.Server, {:myapp, Myapp.Endpoint}}}],
supervisor: [{'Callback', Phoenix.Endpoint.Server}]]]}
I have no build errors, or even warnings, and the console works fine, ping
gives pong
, etc. so I’m not sure what I would look at next since :sys.get_status
is my typical debugging route… Any advice?