Thank you, upgraded to latest phoenix and revert to SIGTERM works as expected.
Just curious, on firefox dev tool it’s say closed with 1011 code instead of 1012, this is expected behavior?
Log:
2023-06-16T03:20:03.169 runner[918555dc2e1783] sin [info] Pulling container image registry.fly.io/flyapps:deployment-01H313E704H5N25YXP804RADX0
2023-06-16T03:20:04.448 runner[918555dc2e1783] sin [info] Successfully prepared image registry.fly.io/flyapps:deployment-01H313E704H5N25YXP804RADX0 (1.279319178s)
2023-06-16T03:20:05.051 runner[918555dc2e1783] sin [info] Configuring firecracker
2023-06-16T03:20:05.559 app[918555dc2e1783] sin [info] 03:20:05.558 [notice] SIGTERM received - shutting down
2023-06-16T03:20:05.559 app[918555dc2e1783] sin [info] 03:20:05.559 [info] Shutting down 2 sockets in 1 rounds of 2000ms
2023-06-16T03:20:05.560 app[918555dc2e1783] sin [info] 03:20:05.559 [error] Ranch listener AppWebEndpoint.HTTP had connection process started with :cowboy_clear:start_link/4 at #PID<0.2148.0> exit with reason: {:function_clause, [{WebSockAdapter.CowboyAdapter, :handle_reply, [{:stop, {:shutdown, :draining}, {1012, 'restart'}, {%{channels: %{"lv:phx-F2kBYNv-puqEugKR" => {#PID<0.2150.0>, #Reference<0.968159881.784596993.155580>, :joined}}, channels_inverse: %{#PID<0.2150.0> => {"lv:phx-F2kBYNv-puqEugKR", "136"}}}, %Phoenix.Socket{assigns: %{}, channel: nil, channel_pid: nil, endpoint: AppWebEndpoint, handler: Phoenix.LiveView.Socket, id: "users_sessions:L4-f_1BRpsJ6pmhInmZhtj8UL8JByVptJcHlMz_i6Ic=", joined: false, join_ref: nil, private: %{connect_info: %{session: %{"_csrf_token" => "dgZloPlhryZR4zq95U55mqWP", "live_socket_id" => "users_sessions:L4-f_1BRpsJ6pmhInmZhtj8UL8JByVptJcHlMz_i6Ic=", "user_token" => <<47, 143, 159, 255, 80, 81, 166, 194, 122, 166, 104, 72, 158, 102, 97, 182, 63, 20, 47, 194, 65, 201, 90, ...>>}}}, pubsub_server: App.PubSub, ref: nil, serializer: Phoenix.Socket.V2.JSONSerializer, topic: nil, transport: :websocket, transport_pid: #PID<0.2148.0>}}}, Phoenix.LiveView.Socket], []}, {:cowboy_websocket, :handler_call, 6, [file: '/app/deps/cowboy/src/cowboy_websocket.erl', line: 528]}, {:cowboy_http, :loop, 1, [file: '/app/deps/cowboy/src/cowboy_http.erl', line: 257]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}]}
2023-06-16T03:20:05.561 app[918555dc2e1783] sin [info] 03:20:05.560 [error] Ranch listener AppWebEndpoint.HTTP had connection process started with :cowboy_clear:start_link/4 at #PID<0.2151.0> exit with reason: {:function_clause, [{WebSockAdapter.CowboyAdapter, :handle_reply, [{:stop, {:shutdown, :draining}, {1012, 'restart'}, {%{channels: %{"lv:phx-F2kCC57jJh5EgALx" => {#PID<0.2153.0>, #Reference<0.968159881.784596993.155689>, :joined}}, channels_inverse: %{#PID<0.2153.0> => {"lv:phx-F2kCC57jJh5EgALx", "94"}}}, %Phoenix.Socket{assigns: %{}, channel: nil, channel_pid: nil, endpoint: AppWebEndpoint, handler: Phoenix.LiveView.Socket, id: "users_sessions:F-7iGvyvm7XbSni-gebk-wB6cYlx-EkocEjKrGtWXH4=", joined: false, join_ref: nil, private: %{connect_info: %{session: %{"_csrf_token" => "3qRo1sjM57rzMteuB8U96MSW", "live_socket_id" => "users_sessions:F-7iGvyvm7XbSni-gebk-wB6cYlx-EkocEjKrGtWXH4=", "user_token" => <<23, 238, 226, 26, 252, 175, 155, 181, 219, 74, 120, 190, 129, 230, 228, 251, 0, 122, 113, 137, 113, 248, 73, ...>>}}}, pubsub_server: App.PubSub, ref: nil, serializer: Phoenix.Socket.V2.JSONSerializer, topic: nil, transport: :websocket, transport_pid: #PID<0.2151.0>}}}, Phoenix.LiveView.Socket], []}, {:cowboy_websocket, :handler_call, 6, [file: '/app/deps/cowboy/src/cowboy_websocket.erl', line: 528]}, {:cowboy_http, :loop, 1, [file: '/app/deps/cowboy/src/cowboy_http.erl', line: 257]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}]}