baroldgene

baroldgene

I’m attempting to deploy a bare-bones elixir app to Heroku. I keep getting the following error: `** (EXIT from pid<0.74.0>) an exception was raised:

    ** (ArgumentError) supervisors expect the child to be a module, a {module, arg} tuple or a map with the child specification, got: {DBConnection.ConnectionPool, {Ecto.Repo.Supervisor, :start_child, [{DBConnection.ConnectionPool, :start_link, [{Postgrex.Protocol, [types: Postgrex.DefaultTypes, hostname: "localhost", port: 5432, repo: StarlinkConnector.Repo, telemetry_prefix: [:starlink_connector, :repo], otp_app: :starlink_connector, timeout: 15000, database: "starlink_connector_prod", pool_size: 2, pool: DBConnection.ConnectionPool]}]}, Ecto.Adapters.Postgres, #Reference<0.115686411.3922591746.186642>, %{opts: [timeout: 15000, pool_size: 2, pool: DBConnection.ConnectionPool], sql: Ecto.Adapters.Postgres.Connection, telemetry: {StarlinkConnector.Repo, :debug, [], [:starlink_connector, :repo, :query]}}]}, :permanent, 5000, :worker, [DBConnection.ConnectionPool]}
        (elixir) lib/supervisor.ex:609: Supervisor.init_child/1
        (elixir) lib/enum.ex:1255: Enum."-map/2-lists^map/1-0-"/2
        (elixir) lib/supervisor.ex:581: Supervisor.init/2
        (stdlib) supervisor.erl:294: :supervisor.init/1
        (stdlib) gen_server.erl:365: :gen_server.init_it/2
        (stdlib) gen_server.erl:333: :gen_server.init_it/6
        (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3`

I’ve added the build packs for both Elixir and Phoenix and specified my elixir version to be 1.7.x in both the mix.exs file and the elixir_buildpack.config. When I run heroku run "mix --version" though I get the following:

Running mix --version on ⬢ xxxxxxxxxxxx... up, run.8452 (Free)
Erlang/OTP 20 [erts-9.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false]

Mix 1.5.0

From googling I feel like Elixir 1.5 won’t actually work for what I’m doing but it seems Heroku is intent on using that for the project?

Showing Posts 1 to 10

NobbZ

NobbZ

Please tell us exactly how you specified the version.

baroldgene

baroldgene OP

In mix.exs:

def project do
    [
      app: :my_app,
      version: "0.1.0",
      elixir: "~> 1.7",
      elixirc_paths: elixirc_paths(Mix.env()),
      compilers: [:phoenix, :gettext] ++ Mix.compilers(),
      start_permanent: Mix.env() == :prod,
      aliases: aliases(),
      deps: deps()
    ]
  end

And in elixir_buildpack.config:

always_rebuild=false
erlang_version=20.1
elixir_version=1.7.2
runtime_path=/app
axelson

axelson

Scenic Core Team

Hmmm, what buildpack are you using and how did you set it?

outlog

outlog

try and flip the always_rebuild=false to true - so you get a (re!)build with the changes made to elixir_buildpack..

baroldgene

baroldgene OP

=== floating-dawn-11111 Buildpack URLs
1. https://github.com/HashNuke/heroku-buildpack-elixir.git
2. https://github.com/gjaldon/heroku-buildpack-phoenix-static.git

Set both via the CLI and in the Pipeline interface on Heroku.

baroldgene

baroldgene OP

The really strange thing is that during the build it says Elixir 1.7.2, but when trying to run mix commands (or start the app) it won’t work with an error innate to Elixir 1.5 and specifies Elixir 1.5 when running the command I linked above.

outlog

outlog

you are checking the mix version heroku run "mix --version" try and check the elixir version heroku run "elixir --version"

does your app run correctly in dev with the same erlang/elixir version?
(eg try and bump elixir to 1.7.4.. think there was some incompatibilities recently against specific early 1.7.x versions..)

(and make sure to have always_rebuild=true when debugging heroku builds..)

NobbZ

NobbZ

If mix --version differs from elixir --version something even worse is going wrong.

outlog

outlog

oh yeah, my bad(didn’t know mix follow elixir versioning.. :man_facepalming:) but definitely use always_rebuild=true which should pick up the specified elixir version then..

baroldgene

baroldgene OP

Yes everything runs fine locally. Again, this is just the base phx.new app, I haven’t done anything other than things to try to get it working on Heroku.

The actual error seems to have something to do with Ecto.

(ArgumentError) supervisors expect the child to be a module, a {module, arg} tuple or a map with the child specification, got: {DBConnection.ConnectionPool, {Ecto.Repo.Supervisor, :start_child, [{DBConnection.ConnectionPool, :start_link, [{Postgrex.Protocol, [types: Postgrex.DefaultTypes, hostname: "localhost", port: 5432, repo: StarlinkConnector.Repo, telemetry_prefix: [:starlink_connector, :repo], otp_app: :starlink_connector, timeout: 15000, database: "starlink_connector_prod", pool_size: 15, pool: DBConnection.ConnectionPool]}]}, Ecto.Adapters.Postgres, #Reference<0.1314834767.3961389057.13396>, %{opts: [timeout: 15000, pool_size: 15, pool: DBConnection.ConnectionPool], sql: Ecto.Adapters.Postgres.Connection, telemetry: {StarlinkConnector.Repo, :debug, [], [:starlink_connector, :repo, :query]}}]}, :permanent, 5000, :worker, [DBConnection.ConnectionPool]}

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
bradley
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
unaware8150
Hello folks! So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New
ChrisAmelia
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication): toke...
New
dillonoconnor
Is there any way to avoid the Hologram compiler running when using iex? It seems like the front-end code could potentially be disregarded...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews