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
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
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
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

Other popular topics Top

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
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31586 112
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement