alisyd

alisyd

Liveview Crashes after some time

Hello there, we have an app built with phoenix liveview which shows tick by tick market data for selected stocks every second, the app works fine on local network, but the websocket connection keeps disconnecting with 1006 when using a public IP or a reverse proxy. We have been trying to debug this for a while, any help is appreciated. Phoenix doesn’t reconnect when the websocket disconnect occurs, instead the entire page is reloaded again, even if we have turn off the code reloader

First Post!

Hermanverschooten

Hermanverschooten

Hi @alisyd

To answer the second part of your question first, live views are processes managed by a supervisor.
The supervisor restarts the process if it crashes, this is by design in OTP and is totally distant from the code reloading that happens in development.

If you say it keeps disconnecting, does this mean it does connect or never connects?
What is your setup? Are you connecting directly to the Phoenix app or is there a reverse-proxy or load-balancer or … in between?

What is in the log of the Phoenix app?

Last Post!

alisyd

alisyd

thanks for the responding, turns out it was because of delayed replies to heartbeat message from js client, so heartbeat timeout occurs and liveView reconnects agains. And also this does not occur when connected to local network and the issue is more prominent when phoenix app is put behind a reverse proxy, and yes this is with a dev build, we have disabled code reloader. I am assuming this has something to do with the udp listener, I have in the application which listens for data from a different application. when I turn off the udp listener everything works fine, and also I am updating socket assigns, every second. udp listener is a genserver that listens for data over a port, I have put a large value for recbuf (65536), Idk if that is causing the issue.

Where Next?

Popular in Questions Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 130286 1222
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 54006 488
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New

We're in Beta

About us Mission Statement