-
Couldn't load subscription status.
- Fork 3k
Description
Environment
Elixir: 1.15.7
Erlang: 26.1.2
Phoenix: 1.7.11
LiveView: 0.20.5
Bandit: 1.2.0
macOS: Sonoma 14.3
Actual behavior
Ever since I upgraded to Phoenix 1.7.11 and enabled longpolling by default, LiveView falls back to longpolling 60-90% of the time instead of opening a WebSocket. I experienced this with my production servers running on Fly, but also in Localhost. I updated the longPollFallbackMs option from the recommended 2500 to 5000, 10_000, and even 15_000, but could observe no change in behaviour. Previously, I had no issues with establishing a WebSocket connection in any of my environments and if I disable longpolling by removing the longPollFallbackMs option, it establishes a WebSocket connection without issues.
I also experienced an issue with Bandit, which might be related. Please see the error and my configuration here: mtrudel/bandit#299
Expected behavior
I expect LiveView to fall back to longpolling almost never, especially not in Localhost.