Giter Club home page Giter Club logo

Comments (5)

HashNuke avatar HashNuke commented on August 23, 2024

@archie Here are a few things:

  • You are using both the elixir command and the mix command.
  • Can you try this instead? web: MIX_ENV=prod mix run --no-halt

from heroku-buildpack-elixir.

archie avatar archie commented on August 23, 2024

Yields the same result unfortunately. Here's a longer, but slightly obfuscated log.

2014-07-31T11:15:42+00:00 heroku[slug-compiler]: Slug compilation started
2014-07-31T11:17:07+00:00 heroku[slug-compiler]: Slug compilation finished
2014-07-31T11:17:07.131532+00:00 heroku[api]: Deploy f13bbfe by [email protected]
2014-07-31T11:17:07.131604+00:00 heroku[api]: Release v13 created by [email protected]
2014-07-31T11:17:07.662804+00:00 heroku[web.1]: State changed from up to starting
2014-07-31T11:17:11.028123+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2014-07-31T11:17:13.051232+00:00 heroku[web.1]: Process exited with status 143
2014-07-31T11:17:18.532956+00:00 heroku[web.1]: Starting process with command `MIX_ENV=prod mix run --no-halt`
2014-07-31T11:17:22.247666+00:00 app[web.1]: 11:17:22.244 [info] Application lager started on node nonode@nohost
2014-07-31T11:17:22.247692+00:00 app[web.1]: 11:17:22.244 [info] Application exlager started on node nonode@nohost
2014-07-31T11:17:22.272451+00:00 app[web.1]: 11:17:22.272 [info] Application exlager exited with reason: stopped
2014-07-31T11:17:22.280249+00:00 app[web.1]:
2014-07-31T11:17:22.280253+00:00 app[web.1]: =INFO REPORT==== 31-Jul-2014::11:17:22 ===
2014-07-31T11:17:22.280256+00:00 app[web.1]:     exited: stopped
2014-07-31T11:17:22.280255+00:00 app[web.1]:     application: lager
2014-07-31T11:17:22.280258+00:00 app[web.1]:     type: temporary
2014-07-31T11:17:22.280363+00:00 app[web.1]: =INFO REPORT==== 31-Jul-2014::11:17:22 ===
2014-07-31T11:17:22.280361+00:00 app[web.1]:
2014-07-31T11:17:22.280365+00:00 app[web.1]:     application: goldrush
2014-07-31T11:17:22.280366+00:00 app[web.1]:     exited: stopped
2014-07-31T11:17:22.280368+00:00 app[web.1]:     type: temporary
2014-07-31T11:17:22.280454+00:00 app[web.1]:
2014-07-31T11:17:22.280460+00:00 app[web.1]:     application: syntax_tools
2014-07-31T11:17:22.280457+00:00 app[web.1]: =INFO REPORT==== 31-Jul-2014::11:17:22 ===
2014-07-31T11:17:22.280462+00:00 app[web.1]:     exited: stopped
2014-07-31T11:17:22.280540+00:00 app[web.1]:
2014-07-31T11:17:22.280543+00:00 app[web.1]: =INFO REPORT==== 31-Jul-2014::11:17:22 ===
2014-07-31T11:17:22.280554+00:00 app[web.1]:     type: temporary
2014-07-31T11:17:22.280640+00:00 app[web.1]: =INFO REPORT==== 31-Jul-2014::11:
17:22 ===
2014-07-31T11:17:22.280553+00:00 app[web.1]:     exited: stopped
2014-07-31T11:17:22.280637+00:00 app[web.1]:
2014-07-31T11:17:22.280464+00:00 app[web.1]:     type: temporary
2014-07-31T11:17:22.280641+00:00 app[web.1]:     application: json
2014-07-31T11:17:22.281275+00:00 app[web.1]:     application: cowboy
2014-07-31T11:17:22.280643+00:00 app[web.1]:     exited: stopped
2014-07-31T11:17:22.281270+00:00 app[web.1]:
2014-07-31T11:17:22.281276+00:00 app[web.1]:     exited: stopped
2014-07-31T11:17:22.280644+00:00 app[web.1]:     type: temporary
2014-07-31T11:17:22.281922+00:00 app[web.1]:
2014-07-31T11:17:22.281273+00:00 app[web.1]: =INFO REPORT==== 31-Jul-2014::11:17:22 ===
2014-07-31T11:17:22.281372+00:00 app[web.1]:
2014-07-31T11:17:22.281378+00:00 app[web.1]:     exited: stopped
2014-07-31T11:17:22.281375+00:00 app[web.1]: =INFO REPORT==== 31-Jul-2014::11:17:22 ===
2014-07-31T11:17:22.281925+00:00 app[web.1]: =INFO REPORT==== 31-Jul-2014::11:17:22 ===
2014-07-31T11:17:22.281377+00:00 app[web.1]:     application: cowlib
2014-07-31T11:17:22.281927+00:00 app[web.1]:     application: ranch
2014-07-31T11:17:22.296527+00:00 app[web.1]: ** (Mix) Could not start application decimal: could not find application file: decimal.app
2014-07-31T11:17:22.281278+00:00 app[web.1]:     type: temporary
2014-07-31T11:17:22.281928+00:00 app[web.1]:     exited: stopped
2014-07-31T11:17:22.281380+00:00 app[web.1]:     type: temporary
2014-07-31T11:17:22.281930+00:00 app[web.1]:     type: temporary
2014-07-31T11:17:22.280551+00:00 app[web.1]:     application: compiler
2014-07-31T11:17:23.474925+00:00 heroku[web.1]: Process exited with status 1
2014-07-31T11:17:23.496793+00:00 heroku[web.1]: State changed from starting to crashed

from heroku-buildpack-elixir.

HashNuke avatar HashNuke commented on August 23, 2024

For MogoChat, I use this in lib/mix/tasks/server.ex

defmodule Mix.Tasks.Server do
  use Mix.Task

  @shortdoc "Start server"

  @moduledoc """
  Server task.
  """
  def run(_) do
    :application.ensure_all_started(:mogo_chat)
    MogoChat.Router.start
  end
end

and then run mix do server, run -no-halt to start the app. B/w the buildpack already sets MIX_ENV=prod, so you don't have to set it manually.

Can you try adapting the above changes to your app?

from heroku-buildpack-elixir.

archie avatar archie commented on August 23, 2024

Cool. Adding such a task resolved the problem. I'm still not sure I understand why this happened in the first place though and why adding a server task works.

Feel free to close the issue if you want. And thanks!

from heroku-buildpack-elixir.

HashNuke avatar HashNuke commented on August 23, 2024

@archie Depends on how your app's supervision tree is. If you add the router to be started by your app supervisor then it'll be started even when you start the mix console. Hence the diff task.

from heroku-buildpack-elixir.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.