baroldgene
Heroku Deployment Woes
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?
Most Liked
outlog
good question.. Have made an issue here for a new buildpack release - current release is from 2015(sic!)..
https://github.com/HashNuke/heroku-buildpack-elixir/issues/145
NobbZ
Could you please tell more about your deplyoment process?
Is the application built and deployed into the exact same environment that is used to run it afterwards or do you have a multi stage setup where you push to staging and then heroku promotes the staging to the new production afterwards? If the latter, it might be that the promotion process is broken.
And the tip to turn of CI is, as far as I understand, only for the case that you use heroku CI to test your application before deploying it. If though you use travis or circle or some other service external to heroku, I do not think, it would make a difference.
outlog
thanks for feedback..
looks like phoenix/guides/deployment/heroku.md at main · phoenixframework/phoenix · GitHub needs to be “backported” to the 1.4 branch..
I’ve created an issue for backporting it.. "backport" heroku.md to 1.4 branch · Issue #3360 · phoenixframework/phoenix · GitHub
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








