I have an app in production that was working fine on Heroku until I pushed my latest commit. The change I made was adding a custom built dependency. The dependency is a simple tic tac toe game which has an OTP DynamicSupervisor that starts with the application. The Heroku logs are giving me the following error:
2018-02-18T00:30:28.519691+00:00 app[web.1]: {"Kernel pid terminated",application_controller,"
{application_start_failure,tic_tac_toe,{bad_return,{{'Elixir.TicTacToe.Application',start,[normal,[]]},{'EXIT',
{undef,[{'Elixir.DynamicSupervisor',start_link,[[{name,'Elixir.TicTacToe.DynamicSupervisor'},
{strategy,one_for_one}]],[]},{application_master,start_it_old,4,[{file,\"application_master.erl\"},
{line,273}]}]}}}}}"}
It seems that my newly added TicTacToe dependency is giving me the trouble as it’s DynamicSupervisor is not being started… Not sure where to start with debugging this as it starts and working fine in :dev locally.
The application.ex file for my TicTacToe dependency is as follows:
defmodule TicTacToe.Application do
use Application
def start(_type, _args) do
options = [
name: TicTacToe.DynamicSupervisor,
strategy: :one_for_one
]
DynamicSupervisor.start_link(options)
end
end
My Procfile is as follows:
web: MIX_ENV=prod mix phx.server
Any suggestions would be greatly appreciated. Cheers.