hotel icon indicating copy to clipboard operation
hotel copied to clipboard

Phoenix (Elixir) servers crash when turned off

Open sardaukar opened this issue 6 years ago • 7 comments

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.

sardaukar avatar Feb 19 '18 20:02 sardaukar

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

typicode avatar Feb 21 '18 21:02 typicode

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

sardaukar avatar Feb 22 '18 02:02 sardaukar

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

sardaukar avatar Feb 22 '18 04:02 sardaukar

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.

typicode avatar Feb 22 '18 10:02 typicode

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 avatar Feb 22 '18 17:02 sardaukar

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 avatar Feb 22 '18 17:02 sardaukar

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

sardaukar avatar Mar 30 '18 12:03 sardaukar