typicode / hotel

🏩 A simple process manager for developers. Start apps from your browser and access them using local domains
MIT License
9.98k stars 424 forks source link

Phoenix (Elixir) servers crash when turned off #277

Open sardaukar opened 6 years ago

sardaukar commented 6 years ago

I'm using Hotel and I love it. However, every time I stop a Phoenix (http://phoenixframework.org/) app, the process crashes and I get an Erlang core dump in the root of the Phoenix project, and I have to restart Hotel.

I'm willing to send the core dump, if it will help.

typicode commented 6 years ago

Hi @sardaukar why do you need to restart hotel after that?

sardaukar commented 6 years ago

Hotel stops responding to proxy requests after the Elixir process crash :/

sardaukar commented 6 years ago

Would it help if I setup an example project as a repo?

typicode commented 6 years ago

Do you know if the hello world fails as well (https://hexdocs.pm/phoenix/up_and_running.html)? If yes, I can use the instructions there to quickly setup a Phoenix server and add it to hotel.

This way you wouldn't need to spend time on an example repo.

sardaukar commented 6 years ago

The hello world crashes too. elixir -v gives me Elixir 1.6.1 (compiled with OTP 20)

Steps I took:

  1. mix phx.new hello
  2. cd hello
  3. change line 10 in config/dev.exs to http: [port: System.get_env("PORT") || 4000],
  4. set DB config on the same file starting on line 52 (usually, just username and password)
  5. run mix ecto.create to create the DB
  6. run hotel add "mix phx.server"
  7. on the Hotel WebUI, start the server, then kill it
  8. you should see:

Crash dump is being written to: erl_crash.dump... done



On the hello world example, Hotel itself doesn't crash. I have a bigger app that makes Hotel crash when you turn the server off. I guess with Elixir you can run extra Elixir "apps" as part of your webapp, and those hung processes on my bigger project might be messing with Hotel.
sardaukar commented 6 years ago

To note: when running the server outside of Hotel (on a normal terminal) you need to Ctrl-C twice to kill it. The first Ctrl-C brings up the usual Elixir trap menu:

BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
       (v)ersion (k)ill (D)b-tables (d)istribution

And once you Ctrl-C again here, then it exits.

sardaukar commented 6 years ago

@typicode anything else I can do to help? I really love using Hotel's proxy