Phoenix config.exs socket

My phoenix application doesn’t use websocket, is it ok to remove the web socket configuration from the config file alongside the socket entry in the endpoint.
On my production server, when I check the loggers, occasionally I see ALIVE message - is this coming from the Erlang VM heart application - is there a way to subscribe to this so I can monitor if my application is alive.


The generators are just a standard template, you don’t even need to use them, you could build up the project from Phoenix’s pieces from scratch pretty easily too. :slight_smile:

Can you post the complete and full message? I don’t see that.



Thanks for the response , kindly find above for your perusal.

I have no clue what’s causing that, I don’t think it’s anything in Phoenix as I’ve never seen it?

You sure it’s not another library you brought in?

I have added a few libraries, will modify the logger config to see if I can get a clue as to which library is logging that. Thanks.

1 Like

I’m even unsure if it’s a Logger logging it, might be something else…

This is from run_erl executable (erl -man run_erl) which is used to start elixir releases.

A code scan reveals that this is from run_erl.c. The code itself is in a function called pass_on which is commented as being the “work loop of the logger”.


/* pass_on()
 * Is the work loop of the logger. Selects on the pipe to the to_erl
 * program erlang. If input arrives from to_erl it is passed on to
 * erlang.

It seems that if this loop (?) has been inactive for a long time (15 minute timeout according to code, which corresponds with the log message). it writes the “ALIVE” message.

The format and frequency of this message is configurable with environmental variables. See erl -man run_erl.


That definitely explains why it didn’t look like a logger message. ^.^

I’m using distillary and I’m not seeing it though, I wonder if it’s configuring it somehow, or not using it…

It looks like distillery uses run_erl as well.

>  ./bin/ocadm start
> grep ALIVE var/log/erlang.log.1
===== ALIVE Wed Nov 27 07:51:57 NZDT 2019
===== ALIVE Wed Nov 27 08:06:57 NZDT 2019
===== ALIVE Wed Nov 27 08:21:57 NZDT 2019
===== ALIVE Wed Nov 27 08:36:57 NZDT 2019

You might not be seeing is because you have more activity? It only shows when nothing has been sent from the erlang shell to run_erl in 15 minutes.

1 Like

Not at night, nothing for hours, and my logs don’t include this, I just checked.

I am running a slightly older version in prod though, maybe related:

╰─➤  elixir -v
Erlang/OTP 21 [erts-10.2.1] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [hipe]

Elixir 1.8.0 (compiled with Erlang/OTP 21)

Or perhaps it’s not coming out of the systemd logging pipe (linked to stdout/stderr) somehow…

If you have it started with foreground it does not seem to use run_erl.

Releases has always been a bit messy.

I’ve used the script at:

So it uses “start”, hmm…