alg

alg

Hi guys,

I’m having some weird problems with running a Phoenix 1.4 app. I have never seen this before with Phoenix 1.3. Right after the app is built afresh I can start it with mix phx.server just fine. Then I do Ctrl-C + Ctrl-C to exit, and upon restart I will most likely get this:

 → mix phx.server
Compiling 24 files (.ex)
[info] Running MasterCoachWeb.Endpoint with cowboy 2.5.0 at http://localhost:4000

Webpack is watching the files…

[error] Ranch listener MasterCoachWeb.Endpoint.HTTP had connection process started with :cowboy_clear:start_link/4 at #PID<0.543.0> exit with reason: {:undef, [{:cowboy_http, :init, [#PID<0.440.0>, MasterCoachWeb.Endpoint.HTTP, #Port<0.44>, :ranch_tcp, %{env: %{dispatch: [{:_, [], [{:_, [], Phoenix.Endpoint.Cowboy2Handler, {MasterCoachWeb.Endpoint, []}}]}]}, stream_handlers: [Plug.Cowboy.Stream]}], []}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}

[error] Ranch listener MasterCoachWeb.Endpoint.HTTP had connection process started with :cowboy_clear:start_link/4 at #PID<0.544.0> exit with reason: {:undef, [{:cowboy_http, :init, [#PID<0.440.0>, MasterCoachWeb.Endpoint.HTTP, #Port<0.45>, :ranch_tcp, %{env: %{dispatch: [{:_, [], [{:_, [], Phoenix.Endpoint.Cowboy2Handler, {MasterCoachWeb.Endpoint, []}}]}]}, stream_handlers: [Plug.Cowboy.Stream]}], []}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}

[error] Ranch listener MasterCoachWeb.Endpoint.HTTP had connection process started with :cowboy_clear:start_link/4 at #PID<0.545.0> exit with reason: {:undef, [{:cowboy_http, :init, [#PID<0.440.0>, MasterCoachWeb.Endpoint.HTTP, #Port<0.46>, :ranch_tcp, %{env: %{dispatch: [{:_, [], [{:_, [], Phoenix.Endpoint.Cowboy2Handler, {MasterCoachWeb.Endpoint, []}}]}]}, stream_handlers: [Plug.Cowboy.Stream]}], []}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}

By trial and error, I found that it’s enough to remove compiled version of cowboy with $ rm -rf _build/dev/lib/cowboy to have another mix phx.server run the app successfully, but then on the next run I have to remove it again.

Any idea what this may be?

Showing Posts 1 to 10

alg

alg OP

I narrowed it down a bit. It happens only when my code base recompiles. If I exit the app and then start again, nothing bad happens. If I change some code, exit and re-run, it mentions compiling some code as above and then starts dumping errors.

OvermindDL1

OvermindDL1

Do you have any concurrent compilations happening, like say do you have an IDE or Editor open that recompiles on save too? If so then change your IDE/Editor to the MIX_ENV=test environment or something.

alg

alg OP

Nope, nothing like it. Only webpack that is usually doing it’s magic on launch and live reload that recompiles sources on change. What do you think?

quatermain

quatermain

Hi,
which Plug do you use? I think we had similar issue when we used old plugs deps.

alg

alg OP

plug 1.7.1
plug_cowboy 2.0.0

I think I’m getting another observation. If I remove ANY (not just cowboy as I stated above) compiled dependency from _build folder prior to running mix phx.server, it obviously triggers compilation of that lib and then the app. After this it all starts nicely.

chu

chu

Started out with 1.4 and I am also experiencing this in my brand new installation.

alg

alg OP

I actually progressed quite a bit with my research and figured that it’s beam.smp process killing my .beam files of certain packages. Not all. I used dtrace tool to trace the removal of .beam files.

I’m looking for the reasons at the moment.

@chu are you using Vim by any chance?

chu

chu

Yes I am using Vim.

alg

alg OP

And ale plugin for Vim?

chu

chu

Yes I have that too

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
Aludel - LLM Evaluation Workbench Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews