Error: Failed due to unhealthy allocations

Hello

I have an error when I deploy a phoenix application. But I have no Idea where it comes from

--> You can detach the terminal anytime without stopping the deployment
==> Monitoring deployment

 1 desired, 1 placed, 0 healthy, 1 unhealthy [restarts: 2] [health checks: 1 total, 1 critical]
Failed Instances

Failure #1

Instance
ID      	PROCESS	VERSION	REGION	DESIRED	STATUS 	HEALTH CHECKS      	RESTARTS	CREATED
411c30f7	       	6      	fra   	run    	running	1 total, 1 critical	2       	4m55s ago

Recent Events
TIMESTAMP           	TYPE            	MESSAGE
2022-03-30T21:25:57Z	Received        	Task received by client
2022-03-30T21:25:57Z	Task Setup      	Building Task Directory
2022-03-30T21:26:25Z	Started         	Task started by client
2022-03-30T21:28:11Z	Restart Signaled	healthcheck: check "a61773ab9e61f7afdefca4f759fca6f9" unhealthy
2022-03-30T21:28:15Z	Terminated      	Exit Code: 143
2022-03-30T21:28:15Z	Restarting      	Task restarting in 1.121248733s
2022-03-30T21:28:23Z	Started         	Task started by client
2022-03-30T21:30:09Z	Restart Signaled	healthcheck: check "a61773ab9e61f7afdefca4f759fca6f9" unhealthy
2022-03-30T21:30:11Z	Terminated      	Exit Code: 143
2022-03-30T21:30:11Z	Restarting      	Task restarting in 1.034628948s
2022-03-30T21:30:18Z	Started         	Task started by client

2022-03-30T21:30:52Z   [info]  lib/poison/encoder.ex:173: Poison.Encoder.BitString.seq/1
2022-03-30T21:30:52Z   [info]Generated poison app
2022-03-30T21:30:52Z   [info]==> comeonin
2022-03-30T21:30:52Z   [info]Compiling 4 files (.ex)
2022-03-30T21:30:52Z   [info]Generated comeonin app
2022-03-30T21:30:52Z   [info]==> ssl_verify_fun
2022-03-30T21:30:52Z   [info]Compiling 7 files (.erl)
2022-03-30T21:30:52Z   [info]Generated ssl_verify_fun app
2022-03-30T21:30:52Z   [info]==> combine
2022-03-30T21:30:52Z   [info]Compiling 6 files (.ex)
2022-03-30T21:30:53Z   [info]Generated combine app
2022-03-30T21:30:53Z   [info]==> elixir_make
2022-03-30T21:30:53Z   [info]Compiling 1 file (.ex)
2022-03-30T21:30:53Z   [info]Generated elixir_make app
2022-03-30T21:30:53Z   [info]==> bcrypt_elixir
2022-03-30T21:30:53Z   [info]mkdir -p /app/_build/prod/lib/bcrypt_elixir/priv
2022-03-30T21:30:53Z   [info]cc -g -O3 -Wall -Wno-format-truncation -I"/usr/local/lib/erlang/erts-12.0.4/include" -Ic_src -fPIC -shared  c_src/bcrypt_nif.c c_src/blowfish.c -o /app/_build/prod/lib/bcrypt_elixir/priv/bcrypt_nif.so
2022-03-30T21:30:54Z   [info]Compiling 3 files (.ex)
2022-03-30T21:30:54Z   [info]Generated bcrypt_elixir app
2022-03-30T21:30:54Z   [info]Reaped child process with pid: 778 and signal: SIGUSR1, core dumped? false
2022-03-30T21:30:55Z   [info]===> Analyzing applications...
2022-03-30T21:30:55Z   [info]===> Compiling certifi
2022-03-30T21:30:55Z   [info]Reaped child process with pid: 802 and signal: SIGUSR1, core dumped? false
2022-03-30T21:30:56Z   [info]===> Analyzing applications...
2022-03-30T21:30:56Z   [info]===> Compiling hackney
2022-03-30T21:30:56Z   [info]==> tzdata
2022-03-30T21:30:56Z   [info]Compiling 17 files (.ex)
2022-03-30T21:30:57Z   [info]Generated tzdata app
2022-03-30T21:30:57Z   [info]==> timex
2022-03-30T21:30:57Z   [info]Compiling 62 files (.ex)
--> v6 failed - Failed due to unhealthy allocations - no stable job version to auto revert to and deploying as v7

--> Troubleshooting guide at https://fly.io/docs/getting-started/troubleshooting/
Error abort


2022-03-30T21:27:54Z app[411c30f7] fra [info]===> Failed to restore /app/deps/cowboy/_build/default/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.
2022-03-30T21:27:54Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:27:54Z app[411c30f7] fra [info]===> Compiling cowboy
2022-03-30T21:27:57Z app[411c30f7] fra [info]Reaped child process with pid: 875 and signal: SIGUSR1, core dumped? false
2022-03-30T21:27:57Z app[411c30f7] fra [info]===> Failed to restore /app/deps/cowboy_telemetry/_build/default/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.
2022-03-30T21:27:57Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:27:57Z app[411c30f7] fra [info]===> Compiling cowboy_telemetry
2022-03-30T21:27:58Z app[411c30f7] fra [info]==> mime
2022-03-30T21:27:58Z app[411c30f7] fra [info]Compiling 2 files (.ex)
2022-03-30T21:27:59Z app[411c30f7] fra [info]Generated mime app
2022-03-30T21:27:59Z app[411c30f7] fra [info]==> tesla
2022-03-30T21:27:59Z app[411c30f7] fra [info]Compiling 29 files (.ex)
2022-03-30T21:28:01Z app[411c30f7] fra [info]==> ex_aws
2022-03-30T21:28:01Z app[411c30f7] fra [info]Compiling 26 files (.ex)
2022-03-30T21:28:03Z app[411c30f7] fra [info]Generated ex_aws app
2022-03-30T21:28:03Z app[411c30f7] fra [info]  lib/ex_aws/s3.ex:262: ExAws.S3.get_bucket_object_versions/2
2022-03-30T21:28:03Z app[411c30f7] fra [info]==> postgrex
2022-03-30T21:28:03Z app[411c30f7] fra [info]Compiling 64 files (.ex)
2022-03-30T21:28:11Z runner[411c30f7] fra [info]Shutting down virtual machine
2022-03-30T21:28:11Z app[411c30f7] fra [info]Sending signal SIGTERM to main child process w/ PID 517
2022-03-30T21:28:12Z app[411c30f7] fra [info]Generated postgrex app
2022-03-30T21:28:13Z app[411c30f7] fra [info]Main child exited with signal (with signal 'SIGTERM', core dumped? false)
2022-03-30T21:28:13Z app[411c30f7] fra [info]Starting clean up.
2022-03-30T21:28:20Z runner[411c30f7] fra [info]Starting instance
2022-03-30T21:28:21Z runner[411c30f7] fra [info]Configuring virtual machine
2022-03-30T21:28:21Z runner[411c30f7] fra [info]Pulling container image
2022-03-30T21:28:21Z runner[411c30f7] fra [info]Unpacking image
2022-03-30T21:28:21Z runner[411c30f7] fra [info]Preparing kernel init
2022-03-30T21:28:23Z app[411c30f7] fra [info]Starting init (commit: 6f9865f)...
2022-03-30T21:28:23Z app[411c30f7] fra [info]Preparing to run: `/app/entrypoint.sh` as root
2022-03-30T21:28:23Z app[411c30f7] fra [info]2022/03/30 21:28:23 listening on [fdaa:0:33cb:a7b:23c4:411c:30f7:2]:22 (DNS: [fdaa::3]:53)
2022-03-30T21:28:24Z app[411c30f7] fra [info]Reaped child process with pid: 552 and signal: SIGUSR1, core dumped? false
2022-03-30T21:28:24Z app[411c30f7] fra [info]==> earmark_parser
2022-03-30T21:28:24Z app[411c30f7] fra [info]Compiling 3 files (.erl)
2022-03-30T21:28:24Z app[411c30f7] fra [info]Compiling 47 files (.ex)
2022-03-30T21:28:27Z app[411c30f7] fra [info]Generated earmark_parser app
2022-03-30T21:28:28Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:28:28Z app[411c30f7] fra [info]===> Compiling parse_trans
2022-03-30T21:28:30Z app[411c30f7] fra [info]===> Failed to restore /app/deps/mimerl/_build/default/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.
2022-03-30T21:28:30Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:28:30Z app[411c30f7] fra [info]Reaped child process with pid: 600 and signal: SIGUSR1, core dumped? false
2022-03-30T21:28:30Z app[411c30f7] fra [info]===> Compiling mimerl
2022-03-30T21:28:31Z app[411c30f7] fra [info]==> connection
2022-03-30T21:28:31Z app[411c30f7] fra [info]Compiling 1 file (.ex)
2022-03-30T21:28:31Z app[411c30f7] fra [info]Generated connection app
2022-03-30T21:28:32Z app[411c30f7] fra [info]Reaped child process with pid: 624 and signal: SIGUSR1, core dumped? false
2022-03-30T21:28:32Z app[411c30f7] fra [info]===> Compiling metrics
2022-03-30T21:28:33Z app[411c30f7] fra [info]Reaped child process with pid: 648 and signal: SIGUSR1, core dumped? false
2022-03-30T21:28:33Z app[411c30f7] fra [info]===> Failed to restore /app/deps/unicode_util_compat/_build/default/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.
2022-03-30T21:28:33Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:28:33Z app[411c30f7] fra [info]===> Compiling unicode_util_compat
2022-03-30T21:28:35Z app[411c30f7] fra [info]Reaped child process with pid: 672 and signal: SIGUSR1, core dumped? false
2022-03-30T21:28:35Z app[411c30f7] fra [info]===> Failed to restore /app/deps/idna/_build/default/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.
2022-03-30T21:28:35Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:28:35Z app[411c30f7] fra [info]===> Compiling idna
2022-03-30T21:28:43Z app[411c30f7] fra [info]Compiling 1 file (.erl)
2022-03-30T21:28:43Z app[411c30f7] fra [info]Compiling 21 files (.ex)
2022-03-30T21:28:45Z app[411c30f7] fra [info]Generated gettext app
2022-03-30T21:28:46Z app[411c30f7] fra [info]===> Failed to restore /app/deps/ranch/_build/default/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.
2022-03-30T21:28:46Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:28:46Z app[411c30f7] fra [info]===> Compiling ranch
2022-03-30T21:28:46Z app[411c30f7] fra [info]Reaped child process with pid: 696 and signal: SIGUSR1, core dumped? false
2022-03-30T21:28:47Z app[411c30f7] fra [info]===> Failed to restore /app/deps/telemetry/_build/default/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.
2022-03-30T21:28:48Z app[411c30f7] fra [info]Reaped child process with pid: 720 and signal: SIGUSR1, core dumped? false
2022-03-30T21:28:48Z app[411c30f7] fra [info]Compiling 7 files (.ex)
2022-03-30T21:28:48Z app[411c30f7] fra [info]Generated telemetry_metrics app
2022-03-30T21:28:49Z app[411c30f7] fra [info]Reaped child process with pid: 744 and signal: SIGUSR1, core dumped? false
2022-03-30T21:28:49Z app[411c30f7] fra [info]===> Failed to restore /app/deps/telemetry_poller/_build/default/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.
2022-03-30T21:28:49Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:28:49Z app[411c30f7] fra [info]===> Compiling telemetry_poller
2022-03-30T21:28:50Z app[411c30f7] fra [info]==> decimal
2022-03-30T21:28:50Z app[411c30f7] fra [info]Compiling 4 files (.ex)
2022-03-30T21:28:50Z app[411c30f7] fra [info]Generated decimal app
2022-03-30T21:28:51Z app[411c30f7] fra [info]==> jason
2022-03-30T21:28:51Z app[411c30f7] fra [info]Compiling 10 files (.ex)
2022-03-30T21:28:54Z app[411c30f7] fra [info]Generated jason app
2022-03-30T21:28:54Z app[411c30f7] fra [info]warning: String.strip/1 is deprecated. Use String.trim/1 instead
2022-03-30T21:28:54Z app[411c30f7] fra [info]  /app/deps/poison/mix.exs:4: Poison.Mixfile
2022-03-30T21:28:54Z app[411c30f7] fra [info]==> poison
2022-03-30T21:28:54Z app[411c30f7] fra [info]Compiling 4 files (.ex)
2022-03-30T21:28:55Z app[411c30f7] fra [info]warning: Integer.to_char_list/2 is deprecated. Use Integer.to_charlist/2 instead
2022-03-30T21:28:55Z app[411c30f7] fra [info]  lib/poison/encoder.ex:173: Poison.Encoder.BitString.seq/1
2022-03-30T21:28:55Z app[411c30f7] fra [info]Compiling 4 files (.ex)
2022-03-30T21:28:55Z app[411c30f7] fra [info]Generated comeonin app
2022-03-30T21:28:56Z app[411c30f7] fra [info]==> ssl_verify_fun
2022-03-30T21:28:56Z app[411c30f7] fra [info]Compiling 7 files (.erl)
2022-03-30T21:28:56Z app[411c30f7] fra [info]Generated ssl_verify_fun app
2022-03-30T21:28:56Z app[411c30f7] fra [info]==> combine
2022-03-30T21:28:56Z app[411c30f7] fra [info]Compiling 6 files (.ex)
2022-03-30T21:28:57Z app[411c30f7] fra [info]==> bcrypt_elixir
2022-03-30T21:28:57Z app[411c30f7] fra [info]mkdir -p /app/_build/prod/lib/bcrypt_elixir/priv
2022-03-30T21:28:57Z app[411c30f7] fra [info]cc -g -O3 -Wall -Wno-format-truncation -I"/usr/local/lib/erlang/erts-12.0.4/include" -Ic_src -fPIC -shared  c_src/bcrypt_nif.c c_src/blowfish.c -o /app/_build/prod/lib/bcrypt_elixir/priv/bcrypt_nif.so
2022-03-30T21:28:58Z app[411c30f7] fra [info]Generated bcrypt_elixir app
2022-03-30T21:28:58Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:28:59Z app[411c30f7] fra [info]===> Compiling certifi
2022-03-30T21:28:59Z app[411c30f7] fra [info]Reaped child process with pid: 778 and signal: SIGUSR1, core dumped? false
2022-03-30T21:28:59Z app[411c30f7] fra [info]===> Compiling hackney
2022-03-30T21:29:00Z app[411c30f7] fra [info]==> tzdata
2022-03-30T21:29:00Z app[411c30f7] fra [info]Compiling 17 files (.ex)
2022-03-30T21:29:00Z app[411c30f7] fra [info]Reaped child process with pid: 802 and signal: SIGUSR1, core dumped? false
2022-03-30T21:29:01Z app[411c30f7] fra [info]Generated tzdata app
2022-03-30T21:29:01Z app[411c30f7] fra [info]==> timex
2022-03-30T21:29:01Z app[411c30f7] fra [info]Compiling 62 files (.ex)
2022-03-30T21:29:21Z app[411c30f7] fra [info]Compiling lib/l10n/gettext.ex (it's taking more than 10s)
2022-03-30T21:29:21Z app[411c30f7] fra [info]Generated timex app
2022-03-30T21:29:21Z app[411c30f7] fra [info]==> earmark
2022-03-30T21:29:21Z app[411c30f7] fra [info]Compiling 15 files (.ex)
2022-03-30T21:29:22Z app[411c30f7] fra [info]Generated earmark app
2022-03-30T21:29:22Z app[411c30f7] fra [info]==> db_connection
2022-03-30T21:29:22Z app[411c30f7] fra [info]Compiling 14 files (.ex)
2022-03-30T21:29:24Z app[411c30f7] fra [info]Compiling 56 files (.ex)
2022-03-30T21:29:36Z app[411c30f7] fra [info]Generated ecto app
2022-03-30T21:29:36Z app[411c30f7] fra [info]==> phoenix_pubsub
2022-03-30T21:29:36Z app[411c30f7] fra [info]Compiling 11 files (.ex)
2022-03-30T21:29:37Z app[411c30f7] fra [info]Generated phoenix_pubsub app
2022-03-30T21:29:38Z app[411c30f7] fra [info]===> Failed to restore /app/deps/cowlib/_build/default/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.
2022-03-30T21:29:38Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:29:38Z app[411c30f7] fra [info]Reaped child process with pid: 826 and signal: SIGUSR1, core dumped? false
2022-03-30T21:29:38Z app[411c30f7] fra [info]===> Compiling cowlib
2022-03-30T21:29:52Z app[411c30f7] fra [info]===> Failed to restore /app/deps/cowboy/_build/default/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.
2022-03-30T21:29:53Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:29:53Z app[411c30f7] fra [info]===> Compiling cowboy
2022-03-30T21:29:53Z app[411c30f7] fra [info]Reaped child process with pid: 850 and signal: SIGUSR1, core dumped? false
2022-03-30T21:29:56Z app[411c30f7] fra [info]===> Compiling cowboy_telemetry
2022-03-30T21:29:57Z app[411c30f7] fra [info]==> mime
2022-03-30T21:29:57Z app[411c30f7] fra [info]Compiling 2 files (.ex)
2022-03-30T21:29:58Z app[411c30f7] fra [info]Generated mime app
2022-03-30T21:29:58Z app[411c30f7] fra [info]==> tesla
2022-03-30T21:29:58Z app[411c30f7] fra [info]Compiling 29 files (.ex)
2022-03-30T21:30:00Z app[411c30f7] fra [info]==> ex_aws
2022-03-30T21:30:00Z app[411c30f7] fra [info]Compiling 26 files (.ex)
2022-03-30T21:30:01Z app[411c30f7] fra [info]Generated ex_aws app
2022-03-30T21:30:01Z app[411c30f7] fra [info]Compiling 7 files (.ex)
2022-03-30T21:30:02Z app[411c30f7] fra [info]Generated ex_aws_s3 app
2022-03-30T21:30:02Z app[411c30f7] fra [info]==> postgrex
2022-03-30T21:30:02Z app[411c30f7] fra [info]Compiling 64 files (.ex)
2022-03-30T21:30:09Z app[411c30f7] fra [info]Sending signal SIGTERM to main child process w/ PID 516
2022-03-30T21:30:10Z app[411c30f7] fra [info]Starting clean up.
th signal (with signal 'SIGTERM', core dumped? false)
2022-03-30T21:30:10Z app[411c30f7] fra [info]Starting clean up.
2022-03-30T21:30:16Z runner[411c30f7] fra [info]Starting instance
2022-03-30T21:30:16Z runner[411c30f7] fra [info]Configuring virtual machine
2022-03-30T21:30:16Z runner[411c30f7] fra [info]Pulling container image
2022-03-30T21:30:17Z runner[411c30f7] fra [info]Unpacking image
2022-03-30T21:30:17Z runner[411c30f7] fra [info]Preparing kernel init
2022-03-30T21:30:18Z runner[411c30f7] fra [info]Configuring firecracker
2022-03-30T21:30:18Z app[411c30f7] fra [info]Preparing to run: `/app/entrypoint.sh` as root
2022-03-30T21:30:18Z app[411c30f7] fra [info]2022/03/30 21:30:18 listening on [fdaa:0:33cb:a7b:23c4:411c:30f7:2]:22 (DNS: [fdaa::3]:53)
2022-03-30T21:30:19Z app[411c30f7] fra [info]Reaped child process with pid: 552 and signal: SIGUSR1, core dumped? false
2022-03-30T21:30:20Z app[411c30f7] fra [info]==> earmark_parser
2022-03-30T21:30:20Z app[411c30f7] fra [info]Compiling 3 files (.erl)
2022-03-30T21:30:20Z app[411c30f7] fra [info]Compiling 47 files (.ex)
2022-03-30T21:30:23Z app[411c30f7] fra [info]Generated earmark_parser app
2022-03-30T21:30:23Z app[411c30f7] fra [info]Reaped child process with pid: 576 and signal: SIGUSR1, core dumped? false
2022-03-30T21:30:24Z app[411c30f7] fra [info]===> Failed to restore /app/deps/parse_trans/_build/default/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.
2022-03-30T21:30:24Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:30:24Z app[411c30f7] fra [info]===> Compiling parse_trans
2022-03-30T21:30:25Z app[411c30f7] fra [info]===> Failed to restore /app/deps/mimerl/_build/default/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.
2022-03-30T21:30:25Z app[411c30f7] fra [info]Reaped child process with pid: 600 and signal: SIGUSR1, core dumped? false
2022-03-30T21:30:25Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:30:26Z app[411c30f7] fra [info]===> Compiling mimerl
2022-03-30T21:30:27Z app[411c30f7] fra [info]==> connection
2022-03-30T21:30:27Z app[411c30f7] fra [info]Generated connection app
2022-03-30T21:30:27Z app[411c30f7] fra [info]Reaped child process with pid: 624 and signal: SIGUSR1, core dumped? false
2022-03-30T21:30:28Z app[411c30f7] fra [info]===> Failed to restore /app/deps/metrics/_build/default/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.
2022-03-30T21:30:28Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:30:28Z app[411c30f7] fra [info]Reaped child process with pid: 648 and signal: SIGUSR1, core dumped? false
2022-03-30T21:30:29Z app[411c30f7] fra [info]===> Compiling unicode_util_compat
2022-03-30T21:30:30Z app[411c30f7] fra [info]Reaped child process with pid: 672 and signal: SIGUSR1, core dumped? false
2022-03-30T21:30:31Z app[411c30f7] fra [info]===> Failed to restore /app/deps/idna/_build/default/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.
2022-03-30T21:30:31Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:30:32Z app[411c30f7] fra [info]===> Compiling idna
2022-03-30T21:30:39Z app[411c30f7] fra [info]==> gettext
2022-03-30T21:30:39Z app[411c30f7] fra [info]Compiling 1 file (.erl)
2022-03-30T21:30:39Z app[411c30f7] fra [info]Compiling 21 files (.ex)
2022-03-30T21:30:41Z app[411c30f7] fra [info]Generated gettext app
2022-03-30T21:30:41Z app[411c30f7] fra [info]Reaped child process with pid: 696 and signal: SIGUSR1, core dumped? false
2022-03-30T21:30:42Z app[411c30f7] fra [info]===> Failed to restore /app/deps/ranch/_build/default/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.
2022-03-30T21:30:42Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:30:42Z app[411c30f7] fra [info]===> Compiling ranch
2022-03-30T21:30:43Z app[411c30f7] fra [info]===> Failed to restore /app/deps/telemetry/_build/default/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.
2022-03-30T21:30:43Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:30:43Z app[411c30f7] fra [info]Reaped child process with pid: 720 and signal: SIGUSR1, core dumped? false
2022-03-30T21:30:44Z app[411c30f7] fra [info]===> Compiling telemetry
2022-03-30T21:30:44Z app[411c30f7] fra [info]==> telemetry_metrics
2022-03-30T21:30:44Z app[411c30f7] fra [info]Compiling 7 files (.ex)
2022-03-30T21:30:44Z app[411c30f7] fra [info]Generated telemetry_metrics app
2022-03-30T21:30:45Z app[411c30f7] fra [info]===> Failed to restore /app/deps/telemetry_poller/_build/default/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.
2022-03-30T21:30:45Z app[411c30f7] fra [info]===> Compiling telemetry_poller
2022-03-30T21:30:45Z app[411c30f7] fra [info]Reaped child process with pid: 744 and signal: SIGUSR1, core dumped? false
2022-03-30T21:30:46Z app[411c30f7] fra [info]Compiling 4 files (.ex)
2022-03-30T21:30:47Z app[411c30f7] fra [info]Generated decimal app
2022-03-30T21:30:47Z app[411c30f7] fra [info]==> jason
2022-03-30T21:30:47Z app[411c30f7] fra [info]Compiling 10 files (.ex)
2022-03-30T21:30:50Z app[411c30f7] fra [info]warning: String.strip/1 is deprecated. Use String.trim/1 instead
2022-03-30T21:30:50Z app[411c30f7] fra [info]  /app/deps/poison/mix.exs:4: Poison.Mixfile
2022-03-30T21:30:50Z app[411c30f7] fra [info]==> poison
2022-03-30T21:30:50Z app[411c30f7] fra [info]Compiling 4 files (.ex)
2022-03-30T21:30:52Z app[411c30f7] fra [info]warning: Integer.to_char_list/2 is deprecated. Use Integer.to_charlist/2 instead
2022-03-30T21:30:52Z app[411c30f7] fra [info]  lib/poison/encoder.ex:173: Poison.Encoder.BitString.seq/1
2022-03-30T21:30:52Z app[411c30f7] fra [info]Generated poison app
2022-03-30T21:30:52Z app[411c30f7] fra [info]==> comeonin
2022-03-30T21:30:52Z app[411c30f7] fra [info]Compiling 4 files (.ex)
2022-03-30T21:30:52Z app[411c30f7] fra [info]Generated comeonin app
2022-03-30T21:30:52Z app[411c30f7] fra [info]==> ssl_verify_fun
2022-03-30T21:30:52Z app[411c30f7] fra [info]Compiling 7 files (.erl)
2022-03-30T21:30:52Z app[411c30f7] fra [info]Generated ssl_verify_fun app
2022-03-30T21:30:52Z app[411c30f7] fra [info]==> combine
2022-03-30T21:30:52Z app[411c30f7] fra [info]Compiling 6 files (.ex)
2022-03-30T21:30:53Z app[411c30f7] fra [info]Generated combine app
2022-03-30T21:30:53Z app[411c30f7] fra [info]==> elixir_make
2022-03-30T21:30:53Z app[411c30f7] fra [info]Compiling 1 file (.ex)
2022-03-30T21:30:53Z app[411c30f7] fra [info]Generated elixir_make app
2022-03-30T21:30:53Z app[411c30f7] fra [info]==> bcrypt_elixir
2022-03-30T21:30:53Z app[411c30f7] fra [info]mkdir -p /app/_build/prod/lib/bcrypt_elixir/priv
2022-03-30T21:30:53Z app[411c30f7] fra [info]cc -g -O3 -Wall -Wno-format-truncation -I"/usr/local/lib/erlang/erts-12.0.4/include" -Ic_src -fPIC -shared  c_src/bcrypt_nif.c c_src/blowfish.c -o /app/_build/prod/lib/bcrypt_elixir/priv/bcrypt_nif.so
2022-03-30T21:30:54Z app[411c30f7] fra [info]Compiling 3 files (.ex)
2022-03-30T21:30:54Z app[411c30f7] fra [info]Generated bcrypt_elixir app
2022-03-30T21:30:54Z app[411c30f7] fra [info]Reaped child process with pid: 778 and signal: SIGUSR1, core dumped? false
2022-03-30T21:30:55Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:30:55Z app[411c30f7] fra [info]===> Compiling certifi
2022-03-30T21:30:55Z app[411c30f7] fra [info]Reaped child process with pid: 802 and signal: SIGUSR1, core dumped? false
2022-03-30T21:30:56Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:30:56Z app[411c30f7] fra [info]===> Compiling hackney
2022-03-30T21:30:56Z app[411c30f7] fra [info]==> tzdata
2022-03-30T21:30:56Z app[411c30f7] fra [info]Compiling 17 files (.ex)
2022-03-30T21:30:57Z app[411c30f7] fra [info]==> timex
2022-03-30T21:30:57Z app[411c30f7] fra [info]Compiling 62 files (.ex)
2022-03-30T21:31:17Z app[411c30f7] fra [info]Compiling lib/l10n/gettext.ex (it's taking more than 10s)
2022-03-30T21:31:18Z app[411c30f7] fra [info]Generated timex app
2022-03-30T21:31:18Z app[411c30f7] fra [info]==> earmark
2022-03-30T21:31:18Z app[411c30f7] fra [info]Compiling 15 files (.ex)
2022-03-30T21:31:19Z app[411c30f7] fra [info]Generated earmark app
2022-03-30T21:31:19Z app[411c30f7] fra [info]==> db_connection
2022-03-30T21:31:19Z app[411c30f7] fra [info]Compiling 14 files (.ex)
2022-03-30T21:31:21Z app[411c30f7] fra [info]Generated db_connection app
2022-03-30T21:31:21Z app[411c30f7] fra [info]==> ecto
2022-03-30T21:31:21Z app[411c30f7] fra [info]Compiling 56 files (.ex)
2022-03-30T21:31:32Z app[411c30f7] fra [info]==> phoenix_pubsub
2022-03-30T21:31:32Z app[411c30f7] fra [info]Compiling 11 files (.ex)
2022-03-30T21:31:33Z app[411c30f7] fra [info]Generated phoenix_pubsub app
2022-03-30T21:31:34Z app[411c30f7] fra [info]Reaped child process with pid: 826 and signal: SIGUSR1, core dumped? false
2022-03-30T21:31:34Z app[411c30f7] fra [info]===> Failed to restore /app/deps/cowlib/_build/default/lib/.rebar3/rebar_compiler_erl/source.dag file. Discarding it.
2022-03-30T21:31:34Z app[411c30f7] fra [info]===> Analyzing applications...
2022-03-30T21:31:35Z app[411c30f7] fra [info]===> Compiling cowlib

I checked all my configuration files. They seem to be ok. I deploy from my Apple M1 with fly deploy --remote-only

I already wasted hours try to deploy that project on fly. I would be very grateful for any advise…

Would you perhaps be building assets on app boot? I think your app is taking too long to compile them so health checks do not pass (they’re defined on your fly.toml)

I can help you, can you share your Dockerfile and fly.toml? Perhaps share your docker entry point if it’s custom made too.

# Use an official Elixir runtime as a parent image
FROM bitwalker/alpine-elixir-phoenix:1.12.3

RUN apk update && \
  apk --no-cache --update add \
    postgresql-client \
    imagemagick && \
    rm -rf /var/cache/apk/*

EXPOSE 4000
ENV PORT=4000

# Create app directory and copy the Elixir projects into it
RUN mkdir /app
COPY . /app
WORKDIR /app

RUN mix deps.get

# Install hex package manager
RUN mix local.hex --force
RUN mix local.rebar --force

# Compile the project
RUN mix do compile

# Same with npm deps
ADD assets/package.json assets/
RUN cd assets && \
    npm install

# Run frontend build, compile, and digest assets
RUN cd assets/ && \
    npm run deploy && \
    cd - && \
    mix do compile, phx.digest

CMD ["/app/entrypoint.sh"]

#!/bin/bash
mix ecto.migrate
exec mix phx.server

# fly.toml file generated for schlaflos on 2022-03-24T13:18:06+01:00

app = "schlaflos"

kill_signal = "SIGTERM"
kill_timeout = 5

[env]
  MIX_ENV = "prod"
  PORT = "4000"
  FLY_APP_NAME="schlaflos"

[experimental]
  allowed_public_ports = []
  auto_rollback = true

[[services]]
  internal_port = 4000
  protocol = "tcp"

  [services.concurrency]
    hard_limit = 25
    soft_limit = 20

  [[services.ports]]
    handlers = ["http"]
    port = 80

  [[services.ports]]
    handlers = ["tls", "http"]
    port = 443

  [[services.tcp_checks]]
    grace_period = "30s" # allow some time for startup
    interval = "15s"
    restart_limit = 5
    timeout = "2s"

I see that you have a custom made Dockerfile and you’re running migrations on app runtime which might be causing the app to take more time until actually running.

If it’s okay with you I’d suggest removing the current Dockerfile and running fly launch. This will detect it’s a phoenix app and generate a Dockerfile with mix releases setup. It also should edit some files such as runtime.exs to make everything go smooth.

As for your fly.toml you’ll probably need to run migrations there:

[deploy]
  release_command = "/app/bin/migrate"

[env]
  PHX_HOST = "YOUR_FLY_APP.fly.dev"

Can you give it a try and let me know what you get?

It works now!
Thank you very much! :pray:

:sunflower:

1 Like