Error deploying Phoenix/Elixir app: "Reaped child process with pid"

My repo: GitHub - Nezteb/temp

I can run this locally with Docker and Docker Compose just fine (you can clone the repo and run make and it will automatically build and everything if you’d like), but trying to deploy to Fly gives me errors. Here are the logs:

2022-05-07T21:29:52.673 runner[28dc4d7d] sea [info] Starting instance
2022-05-07T21:29:53.456 runner[28dc4d7d] sea [info] Configuring virtual machine
2022-05-07T21:29:53.460 runner[28dc4d7d] sea [info] Pulling container image
2022-05-07T21:29:54.058 runner[28dc4d7d] sea [info] Unpacking image
2022-05-07T21:29:54.076 runner[28dc4d7d] sea [info] Preparing kernel init
2022-05-07T21:29:56.538 runner[28dc4d7d] sea [info] Configuring firecracker
2022-05-07T21:29:56.643 runner[28dc4d7d] sea [info] Starting virtual machine
2022-05-07T21:29:56.888 app[28dc4d7d] sea [info] Starting init (commit: 252b7bd)...
2022-05-07T21:29:56.915 app[28dc4d7d] sea [info] Preparing to run: `/app/entrypoint.sh` as root
2022-05-07T21:29:56.947 app[28dc4d7d] sea [info] 2022/05/07 21:29:56 listening on [fdaa:0:4468:a7b:2dbb:28dc:4d7d:2]:22 (DNS: [fdaa::3]:53)
2022-05-07T21:29:59.475 app[28dc4d7d] sea [info] Erlang/OTP 23 [erts-11.2.2.12] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [hipe]
2022-05-07T21:29:59.484 app[28dc4d7d] sea [info] Elixir 1.11.4 (compiled with Erlang/OTP 23)
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] DATABASE_URL=REDACTED
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] ELIXIR_VERSION=v1.11.4
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] FLY_ALLOC_ID=REDACTED
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] FLY_APP_NAME=temp
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] FLY_PUBLIC_IP=REDACTED
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] FLY_REDIS_CACHE_URL=REDACTED
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] FLY_REGION=sea
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] FLY_VCPU_COUNT=1
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] FLY_VM_MEMORY_MB=256
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] HOME=/root
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] LANG=C.UTF-8
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] MIX_ENV=prod
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] OTP_VERSION=23.3.4.13
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] PGPASSWORD=REDACTED
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] PORT=8080
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] POSTGRES_DATABASE=temp
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] POSTGRES_HOST=temp-db.internal
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] POSTGRES_PASSWORD=REDACTED
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] POSTGRES_USER=postgres
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] PWD=/app
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] REBAR3_VERSION=3.18.0
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] REBAR_VERSION=2.6.4
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] SECRET_KEY_BASE=REDACTED
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] SHLVL=0
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] TERM=linux
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] _=/usr/bin/env
2022-05-07T21:29:59.490 app[28dc4d7d] sea [info] cgroup_enable=memory
2022-05-07T21:29:59.666 app[28dc4d7d] sea [info] Connected to database host temp-db.internal
2022-05-07T21:29:59.747 app[28dc4d7d] sea [info] Database temp already exists
2022-05-07T21:29:59.931 app[28dc4d7d] sea [info] Reaped child process with pid: 594 and signal: SIGUSR1, core dumped? false
2022-05-07T21:30:01.231 app[28dc4d7d] sea [info] Resolving Hex dependencies...
2022-05-07T21:30:01.248 app[28dc4d7d] sea [info] Dependency resolution completed:
2022-05-07T21:30:01.248 app[28dc4d7d] sea [info] Unchanged:
2022-05-07T21:30:01.249 app[28dc4d7d] sea [info]   absinthe 1.5.2
2022-05-07T21:30:01.249 app[28dc4d7d] sea [info]   absinthe_plug 1.5.0
2022-05-07T21:30:01.249 app[28dc4d7d] sea [info]   connection 1.0.4
2022-05-07T21:30:01.249 app[28dc4d7d] sea [info]   cowboy 2.8.0
2022-05-07T21:30:01.249 app[28dc4d7d] sea [info]   cowlib 2.9.1
2022-05-07T21:30:01.249 app[28dc4d7d] sea [info]   db_connection 2.2.2
2022-05-07T21:30:01.249 app[28dc4d7d] sea [info]   decimal 1.8.1
2022-05-07T21:30:01.249 app[28dc4d7d] sea [info]   dialyxir 1.1.0
2022-05-07T21:30:01.249 app[28dc4d7d] sea [info]   ecto 3.4.6
2022-05-07T21:30:01.249 app[28dc4d7d] sea [info]   ecto_sql 3.4.5
2022-05-07T21:30:01.249 app[28dc4d7d] sea [info]   erlex 0.2.6
2022-05-07T21:30:01.249 app[28dc4d7d] sea [info]   gettext 0.18.1
2022-05-07T21:30:01.249 app[28dc4d7d] sea [info]   jason 1.2.1
2022-05-07T21:30:01.249 app[28dc4d7d] sea [info]   mime 1.4.0
2022-05-07T21:30:01.250 app[28dc4d7d] sea [info]   nimble_parsec 0.6.0
2022-05-07T21:30:01.250 app[28dc4d7d] sea [info]   phoenix 1.5.4
2022-05-07T21:30:01.250 app[28dc4d7d] sea [info]   phoenix_ecto 4.1.0
2022-05-07T21:30:01.250 app[28dc4d7d] sea [info]   phoenix_html 2.14.2
2022-05-07T21:30:01.250 app[28dc4d7d] sea [info]   phoenix_live_dashboard 0.2.7
2022-05-07T21:30:01.250 app[28dc4d7d] sea [info]   phoenix_live_view 0.14.4
2022-05-07T21:30:01.250 app[28dc4d7d] sea [info]   phoenix_pubsub 2.0.0
2022-05-07T21:30:01.250 app[28dc4d7d] sea [info]   plug 1.10.4
2022-05-07T21:30:01.250 app[28dc4d7d] sea [info]   plug_cowboy 2.3.0
2022-05-07T21:30:01.250 app[28dc4d7d] sea [info]   plug_crypto 1.1.2
2022-05-07T21:30:01.250 app[28dc4d7d] sea [info]   poison 2.1.0
2022-05-07T21:30:01.250 app[28dc4d7d] sea [info]   postgrex 0.15.5
2022-05-07T21:30:01.250 app[28dc4d7d] sea [info]   ranch 1.7.1
2022-05-07T21:30:01.251 app[28dc4d7d] sea [info]   telemetry 0.4.2
2022-05-07T21:30:01.251 app[28dc4d7d] sea [info]   telemetry_metrics 0.5.0
2022-05-07T21:30:01.251 app[28dc4d7d] sea [info]   telemetry_poller 0.5.1
2022-05-07T21:30:01.353 app[28dc4d7d] sea [info] All dependencies are up to date
2022-05-07T21:30:01.436 app[28dc4d7d] sea [info] ==> connection
2022-05-07T21:30:01.436 app[28dc4d7d] sea [info] Compiling 1 file (.ex)
2022-05-07T21:30:01.630 app[28dc4d7d] sea [info] warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
2022-05-07T21:30:01.630 app[28dc4d7d] sea [info]   lib/connection.ex:429
2022-05-07T21:30:01.630 app[28dc4d7d] sea [info] warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
2022-05-07T21:30:01.630 app[28dc4d7d] sea [info]   lib/connection.ex:431
2022-05-07T21:30:01.636 app[28dc4d7d] sea [info] warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
2022-05-07T21:30:01.636 app[28dc4d7d] sea [info]   lib/connection.ex:491
2022-05-07T21:30:01.638 app[28dc4d7d] sea [info] warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
2022-05-07T21:30:01.638 app[28dc4d7d] sea [info]   lib/connection.ex:540
2022-05-07T21:30:01.640 app[28dc4d7d] sea [info] warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
2022-05-07T21:30:01.640 app[28dc4d7d] sea [info]   lib/connection.ex:581
2022-05-07T21:30:01.641 app[28dc4d7d] sea [info] warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
2022-05-07T21:30:01.641 app[28dc4d7d] sea [info]   lib/connection.ex:625
2022-05-07T21:30:01.642 app[28dc4d7d] sea [info] warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
2022-05-07T21:30:01.642 app[28dc4d7d] sea [info]   lib/connection.ex:628
2022-05-07T21:30:01.642 app[28dc4d7d] sea [info] warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
2022-05-07T21:30:01.642 app[28dc4d7d] sea [info]   lib/connection.ex:631
2022-05-07T21:30:01.643 app[28dc4d7d] sea [info] warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
2022-05-07T21:30:01.643 app[28dc4d7d] sea [info]   lib/connection.ex:657
2022-05-07T21:30:01.643 app[28dc4d7d] sea [info] warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
2022-05-07T21:30:01.643 app[28dc4d7d] sea [info]   lib/connection.ex:660
2022-05-07T21:30:01.643 app[28dc4d7d] sea [info] warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
2022-05-07T21:30:01.643 app[28dc4d7d] sea [info]   lib/connection.ex:663
2022-05-07T21:30:01.645 app[28dc4d7d] sea [info] warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
2022-05-07T21:30:01.645 app[28dc4d7d] sea [info]   lib/connection.ex:744
2022-05-07T21:30:01.646 app[28dc4d7d] sea [info] warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
2022-05-07T21:30:01.646 app[28dc4d7d] sea [info]   lib/connection.ex:770
2022-05-07T21:30:01.647 app[28dc4d7d] sea [info] warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
2022-05-07T21:30:01.647 app[28dc4d7d] sea [info]   lib/connection.ex:813
2022-05-07T21:30:01.808 app[28dc4d7d] sea [info] Generated connection app
2022-05-07T21:30:01.846 app[28dc4d7d] sea [info] ==> nimble_parsec
2022-05-07T21:30:01.846 app[28dc4d7d] sea [info] Compiling 4 files (.ex)
2022-05-07T21:30:01.927 app[28dc4d7d] sea [info] [    5.109807] blk_update_request: I/O error, dev vda, sector 148490 op 0x1:(WRITE) flags 0x103000 phys_seg 1 prio class 0
2022-05-07T21:30:01.928 app[28dc4d7d] sea [info] [    5.111389] Buffer I/O error on dev vda, logical block 74245, lost async page write
2022-05-07T21:30:02.905 app[28dc4d7d] sea [info] Generated nimble_parsec app
2022-05-07T21:30:02.957 app[28dc4d7d] sea [info] ==> gettext
2022-05-07T21:30:02.957 app[28dc4d7d] sea [info] Compiling 1 file (.erl)
2022-05-07T21:30:03.113 app[28dc4d7d] sea [info] Compiling 20 files (.ex)
2022-05-07T21:30:05.933 app[28dc4d7d] sea [info] Generated gettext app
2022-05-07T21:30:06.539 app[28dc4d7d] sea [info] ===> Analyzing applications...
2022-05-07T21:30:06.566 app[28dc4d7d] sea [info] ===> Compiling ranch
2022-05-07T21:30:06.941 app[28dc4d7d] sea [info] Reaped child process with pid: 621 and signal: SIGUSR1, core dumped? false
2022-05-07T21:30:06.942 app[28dc4d7d] sea [info] Reaped child process with pid: 646 and signal: SIGUSR1, core dumped? false
2022-05-07T21:30:07.159 app[28dc4d7d] sea [info] ===> Analyzing applications...
2022-05-07T21:30:07.189 app[28dc4d7d] sea [info] ===> Compiling telemetry
2022-05-07T21:30:07.260 app[28dc4d7d] sea [info] ==> telemetry_metrics
2022-05-07T21:30:07.260 app[28dc4d7d] sea [info] Compiling 7 files (.ex)
2022-05-07T21:30:07.355 app[28dc4d7d] sea [info] warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
2022-05-07T21:30:07.355 app[28dc4d7d] sea [info]   lib/telemetry_metrics/console_reporter.ex:123
2022-05-07T21:30:07.830 app[28dc4d7d] sea [info] Generated telemetry_metrics app
2022-05-07T21:30:07.943 app[28dc4d7d] sea [info] Reaped child process with pid: 671 and signal: SIGUSR1, core dumped? false
2022-05-07T21:30:08.423 app[28dc4d7d] sea [info] ===> Analyzing applications...
2022-05-07T21:30:08.452 app[28dc4d7d] sea [info] ===> Compiling telemetry_poller
2022-05-07T21:30:08.513 app[28dc4d7d] sea [info] ==> decimal
2022-05-07T21:30:08.513 app[28dc4d7d] sea [info] Compiling 1 file (.ex)
2022-05-07T21:30:09.806 app[28dc4d7d] sea [info] Generated decimal app
2022-05-07T21:30:09.952 app[28dc4d7d] sea [info] ==> absinthe
2022-05-07T21:30:09.952 app[28dc4d7d] sea [info] Compiling 1 file (.erl)
2022-05-07T21:30:11.327 app[28dc4d7d] sea [info] Compiling 248 files (.ex)
2022-05-07T21:30:25.029 app[28dc4d7d] sea [info] warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
2022-05-07T21:30:25.029 app[28dc4d7d] sea [info]   lib/absinthe/pipeline/batch_resolver.ex:96
2022-05-07T21:30:33.004 app[28dc4d7d] sea [info] warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
2022-05-07T21:30:33.004 app[28dc4d7d] sea [info]   lib/absinthe/subscription/local.ex:73
2022-05-07T21:30:34.529 app[28dc4d7d] sea [info] warning: :crypto.hash/2 defined in application :crypto is used by the current application but the current application does not depend on :crypto. To fix this, you must do one of:
2022-05-07T21:30:34.529 app[28dc4d7d] sea [info]   1. If :crypto is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs
2022-05-07T21:30:34.529 app[28dc4d7d] sea [info]   2. If :crypto is a dependency, make sure it is listed under "def deps" in your mix.exs
2022-05-07T21:30:34.529 app[28dc4d7d] sea [info]   3. In case you don't want to add a requirement to :crypto, you may optionally skip this warning by adding [xref: [exclude: [:crypto]]] to your "def project" in mix.exs
2022-05-07T21:30:34.529 app[28dc4d7d] sea [info]   lib/absinthe/phase/subscription/subscribe_self.ex:159: Absinthe.Phase.Subscription.SubscribeSelf.get_document_id/3
2022-05-07T21:30:34.530 app[28dc4d7d] sea [info] warning: :httpd_util.hexlist_to_integer/1 defined in application :inets is used by the current application but the current application does not depend on :inets. To fix this, you must do one of:
2022-05-07T21:30:34.530 app[28dc4d7d] sea [info]   1. If :inets is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs
2022-05-07T21:30:34.530 app[28dc4d7d] sea [info]   2. If :inets is a dependency, make sure it is listed under "def deps" in your mix.exs
2022-05-07T21:30:34.530 app[28dc4d7d] sea [info]   3. In case you don't want to add a requirement to :inets, you may optionally skip this warning by adding [xref: [exclude: [:httpd_util]]] to your "def project" in mix.exs
2022-05-07T21:30:34.530 app[28dc4d7d] sea [info]   lib/absinthe/lexer.ex:282: Absinthe.Lexer.unescape_unicode/5
2022-05-07T21:30:34.554 app[28dc4d7d] sea [info] warning: incompatible types:
2022-05-07T21:30:34.554 app[28dc4d7d] sea [info]     map() !~ atom()
2022-05-07T21:30:34.554 app[28dc4d7d] sea [info] in expression:
2022-05-07T21:30:34.554 app[28dc4d7d] sea [info]     # lib/absinthe/blueprint.ex:215
2022-05-07T21:30:34.554 app[28dc4d7d] sea [info]     module.__absinthe_blueprint__
2022-05-07T21:30:34.554 app[28dc4d7d] sea [info] where "module" was given the type atom() in:
2022-05-07T21:30:34.554 app[28dc4d7d] sea [info]     # lib/absinthe/blueprint.ex:214
2022-05-07T21:30:34.554 app[28dc4d7d] sea [info]     is_atom(module)
2022-05-07T21:30:34.554 app[28dc4d7d] sea [info] where "module" was given the type map() (due to calling var.field) in:
2022-05-07T21:30:34.554 app[28dc4d7d] sea [info]     # lib/absinthe/blueprint.ex:215
2022-05-07T21:30:34.554 app[28dc4d7d] sea [info]     module.__absinthe_blueprint__
2022-05-07T21:30:34.554 app[28dc4d7d] sea [info] HINT: "var.field" (without parentheses) implies "var" is a map() while "var.fun()" (with parentheses) implies "var" is an atom()
2022-05-07T21:30:34.554 app[28dc4d7d] sea [info] Conflict found at
2022-05-07T21:30:34.554 app[28dc4d7d] sea [info]   lib/absinthe/blueprint.ex:215: Absinthe.Blueprint.types_by_name/1
2022-05-07T21:30:34.556 app[28dc4d7d] sea [info] warning: incompatible types:
2022-05-07T21:30:34.556 app[28dc4d7d] sea [info]     map() !~ atom()
2022-05-07T21:30:34.556 app[28dc4d7d] sea [info] in expression:
2022-05-07T21:30:34.556 app[28dc4d7d] sea [info]     # lib/absinthe/blueprint.ex:178
2022-05-07T21:30:34.556 app[28dc4d7d] sea [info]     ext_blueprint.__absinthe_blueprint__
2022-05-07T21:30:34.556 app[28dc4d7d] sea [info] where "ext_blueprint" was given the type atom() in:
2022-05-07T21:30:34.556 app[28dc4d7d] sea [info]     # lib/absinthe/blueprint.ex:177
2022-05-07T21:30:34.556 app[28dc4d7d] sea [info]     is_atom(ext_blueprint)
2022-05-07T21:30:34.556 app[28dc4d7d] sea [info] where "ext_blueprint" was given the type map() (due to calling var.field) in:
2022-05-07T21:30:34.556 app[28dc4d7d] sea [info]     # lib/absinthe/blueprint.ex:178
2022-05-07T21:30:34.556 app[28dc4d7d] sea [info]     ext_blueprint.__absinthe_blueprint__
2022-05-07T21:30:34.556 app[28dc4d7d] sea [info] HINT: "var.field" (without parentheses) implies "var" is a map() while "var.fun()" (with parentheses) implies "var" is an atom()
2022-05-07T21:30:34.556 app[28dc4d7d] sea [info] Conflict found at
2022-05-07T21:30:34.556 app[28dc4d7d] sea [info]   lib/absinthe/blueprint.ex:178: Absinthe.Blueprint.extend_fields/2
2022-05-07T21:30:34.624 app[28dc4d7d] sea [info] warning: Mix.Project.compile/1 is deprecated. Use Mix.Task.run("compile", args) instead
2022-05-07T21:30:34.624 app[28dc4d7d] sea [info]   lib/mix/tasks/absinthe.schema.sdl.ex:50: Mix.Tasks.Absinthe.Schema.Sdl.run/1
2022-05-07T21:30:34.636 app[28dc4d7d] sea [info] warning: Mix.Project.compile/1 is deprecated. Use Mix.Task.run("compile", args) instead
2022-05-07T21:30:34.636 app[28dc4d7d] sea [info]   lib/mix/tasks/absinthe.schema.json.ex:81: Mix.Tasks.Absinthe.Schema.Json.run/1
2022-05-07T21:30:34.768 app[28dc4d7d] sea [info] warning: incompatible types:
2022-05-07T21:30:34.768 app[28dc4d7d] sea [info]     map() !~ atom()
2022-05-07T21:30:34.768 app[28dc4d7d] sea [info] in expression:
2022-05-07T21:30:34.768 app[28dc4d7d] sea [info]     # lib/absinthe/type.ex:56
2022-05-07T21:30:34.768 app[28dc4d7d] sea [info]     module.functions
2022-05-07T21:30:34.768 app[28dc4d7d] sea [info] where "module" was given the type atom() in:
2022-05-07T21:30:34.768 app[28dc4d7d] sea [info]     # lib/absinthe/type.ex:55
2022-05-07T21:30:34.768 app[28dc4d7d] sea [info]     %module{}
2022-05-07T21:30:34.768 app[28dc4d7d] sea [info] where "module" was given the type map() (due to calling var.field) in:
2022-05-07T21:30:34.768 app[28dc4d7d] sea [info]     # lib/absinthe/type.ex:56
2022-05-07T21:30:34.768 app[28dc4d7d] sea [info]     module.functions
2022-05-07T21:30:34.768 app[28dc4d7d] sea [info] HINT: "var.field" (without parentheses) implies "var" is a map() while "var.fun()" (with parentheses) implies "var" is an atom()
2022-05-07T21:30:34.768 app[28dc4d7d] sea [info] Conflict found at
2022-05-07T21:30:34.768 app[28dc4d7d] sea [info]   lib/absinthe/type.ex:56: Absinthe.Type.expand/1
2022-05-07T21:30:34.984 app[28dc4d7d] sea [info] Generated absinthe app
2022-05-07T21:30:35.031 app[28dc4d7d] sea [info] ==> jason
2022-05-07T21:30:35.031 app[28dc4d7d] sea [info] Compiling 8 files (.ex)
2022-05-07T21:30:40.248 app[28dc4d7d] sea [info] [   43.428003] Out of memory: Killed process 563 (beam.smp) total-vm:1919940kB, anon-rss:199380kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:716kB oom_score_adj:0
2022-05-07T21:30:40.267 app[28dc4d7d] sea [info] /app/entrypoint.sh: line 34:   563 Killed                  mix do deps.get, phx.server
2022-05-07T21:30:40.292 app[28dc4d7d] sea [info] Main child exited normally with code: 137
2022-05-07T21:30:40.294 app[28dc4d7d] sea [info] Reaped child process with pid: 578, exit code: 0
2022-05-07T21:30:40.295 app[28dc4d7d] sea [info] Reaped child process with pid: 595, exit code: 0
2022-05-07T21:30:40.296 app[28dc4d7d] sea [info] Starting clean up.

I’ve found a few similar posts about this on the forum, but none of their solutions worked for me:

Any and all ideas appreciated!

The line that stands out to me is:

2022-05-07T21:30:40.248 app[28dc4d7d] sea [info] [   43.428003] Out of memory: Killed process 563 (beam.smp) total-vm:1919940kB, anon-rss:199380kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:716kB oom_score_adj:0

This seems to indicate that your app tried to allocate 1919940kB (1.9 GB and change) and was at that point killed for needing too much memory.

You might want to look into running your app as a release. That way, compilation does not need to happen on the production VMs (which usually have less RAM as they don’t need that much for normal tasks) and instead either on your local machine or on a Fly builder VM.

EDIT: I only now saw the link to your repo. It seems like you are already running a Docker image.
You might want to compare your Docker image with Fly’s example which can be found here. For instance, it seems like you do not run deps.compile as part of the build process right now, and still start the final app through Mix rather than starting the created release.
Fly’s main instructions for using Elixir with Docker are here in the docs.

1 Like

Alright after a couple hours of tinkering I got this to work by following your advice and reworking my Dockerfile. Initially I was hoping to have a single Dockerfile that could be used for local development (without needing Elixir installed on the host machine) as well as the production deploy to Fly, but I see now that it’s not super feasible. So now I have two Dockerfiles: one for Fly/production and one for local development. This works reasonably well.

Thank you!

1 Like