mix release success, but start the release failed

I just create a hello demo followed Up and Running — Phoenix v1.7.9
and release it with Deploying with Releases — Phoenix v1.7.9 .
then I start the phoenix app with command
_build/prod/rel/hello/bin/hello start

and got app crashed. the output follows.

2023-11-02 17:19:12.939483 Error in process ~p with exit value:~n~p~n
{"Kernel pid terminated",application_controller,{undef,[{erlang,get_stacktrace,[],[]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,606}]},{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,667}]}]}}
Kernel pid terminated (application_controller) ({undef,[{erlang,get_stacktrace,[],[]},{gen_server,try_dispatch,4,[{_},{_}]},{gen_server,handle_msg,5,[{_},{_}]}]})

Crash dump is being written to: erl_crash.dump...done

my os: 3.10.0-957.el7.x86_64
erlang: Erlang/OTP 24 [erts-12.2.1] [source] [64-bit] [smp:6:6] [ds:6:6:10] [async-threads:1]
elixir: Elixir 1.15.7 (compiled with Erlang/OTP 24)
phoenix: 1.7.9

This is still on your dev machine?
Have you tried starting the app in :prod mode? MIX_ENV=prod mix phx.server


yes. MIX_ENV=prod mix phx.server works fine.
and can serve normal requests.

finally, I upgrade the otp from otp-24 to otp-26, sovle this problem.

1 Like