# \#longpoll

**URL:** https://forum.elixirforum.com/tag/longpoll/699.md

[Latest](https://forum.elixirforum.com/latest.md) · [Categories](https://forum.elixirforum.com/categories.md) · [Tags](https://forum.elixirforum.com/tags.md)

---

## [Handling Channels/LiveView LongPoll fallback "unmatched topic"](https://forum.elixirforum.com/t/handling-channels-liveview-longpoll-fallback-unmatched-topic/72378)

<div class="topic-metadata">

**Author:** [@rhcarvalho](https://forum.elixirforum.com/u/rhcarvalho)\
**Replies:** 9\
**Last updated:** [May 8, 2026, 10:09am UTC](https://forum.elixirforum.com/t/handling-channels-liveview-longpoll-fallback-unmatched-topic/72378 "2026-05-08T10:09:08Z")

</div>

I’m investigating LiveView JS client errors when the Socket/LiveSocket throws failed with reason: {"reason":"unmatched topic"}. I modified Phoenix 1.8.1 to emit telemetry events when the “unmatched topic” condition happ…

---

## [Long polling taking 10 seconds](https://forum.elixirforum.com/t/long-polling-taking-10-seconds/73177)

<div class="topic-metadata">

**Author:** [@Arsenalist](https://forum.elixirforum.com/u/Arsenalist)\
**Replies:** 1\
**Last updated:** [November 3, 2025, 5:22pm UTC](https://forum.elixirforum.com/t/long-polling-taking-10-seconds/73177 "2025-11-03T17:22:27Z")

</div>

When I’m on certain networks or within some VPN, I notice that the Phoenix app falls back to long polling as somewhat expected. But I’m wondering why it takes 10 seconds for each long poll request? I would imagine this w…

---

## [When does LiveView use long polling instead of websocket?](https://forum.elixirforum.com/t/when-does-liveview-use-long-polling-instead-of-websocket/65541)

<div class="topic-metadata">

**Author:** [@arrowsmith](https://forum.elixirforum.com/u/arrowsmith)\
**Replies:** 5\
**Last updated:** [April 12, 2025, 8:34pm UTC](https://forum.elixirforum.com/t/when-does-liveview-use-long-polling-instead-of-websocket/65541 "2025-04-12T20:34:38Z")

</div>

The default Phoenix Endpoint configures a mount-point for both a websocket and long polling: defmodule MyAppWeb.Endpoint do … socket "/live", Phoenix.LiveView.Socket, websocket: \[connect\_info: \[session: @sessio…

---

## [Update phx.gen.socket to use LongPoll fallback](https://forum.elixirforum.com/t/update-phx-gen-socket-to-use-longpoll-fallback/70198)

<div class="topic-metadata">

**Author:** [@rhcarvalho](https://forum.elixirforum.com/u/rhcarvalho)\
**Replies:** 0\
**Last updated:** [March 29, 2025, 8:33am UTC](https://forum.elixirforum.com/t/update-phx-gen-socket-to-use-longpoll-fallback/70198 "2025-03-29T08:33:21Z")

</div>

In early 2024 Chris updated the phx.new templates to enable LongPoll fallback for LiveView (related Phoenix Pull Request). I propose we update the phx.gen.socket template to also fallback to LongPoll for consistency. I…

---

## [liveSocket.disconnect() unexpected behavior with longpoll](https://forum.elixirforum.com/t/livesocket-disconnect-unexpected-behavior-with-longpoll/65402)

<div class="topic-metadata">

**Author:** [@rhcarvalho](https://forum.elixirforum.com/u/rhcarvalho)\
**Replies:** 1\
**Last updated:** [August 8, 2024, 7:39pm UTC](https://forum.elixirforum.com/t/livesocket-disconnect-unexpected-behavior-with-longpoll/65402 "2024-08-08T19:39:29Z")

</div>

Hi! Today I noticed that when a LiveSocket goes into longpoll fallback mode, calling liveSocket.disconnect() on the browser console behaves different than when the LiveSocket is connected over a WebSocket. liveSocket.d…

---

## [Longpoll and Phoenix LiveView - how do I make sure sessions are available on the LV callbacks?](https://forum.elixirforum.com/t/longpoll-and-phoenix-liveview-how-do-i-make-sure-sessions-are-available-on-the-lv-callbacks/62335)

<div class="topic-metadata">

**Author:** [@ashneyderman](https://forum.elixirforum.com/u/ashneyderman)\
**Replies:** 4\
**Last updated:** [April 4, 2024, 8:58pm UTC](https://forum.elixirforum.com/t/longpoll-and-phoenix-liveview-how-do-i-make-sure-sessions-are-available-on-the-lv-callbacks/62335 "2024-04-04T20:58:28Z")

</div>

Recently i got the need to switch to longpoll instead of using websockets. So i make a config change in the endpoint: socket("/live", Phoenix.LiveView.Socket, websocket: \[ connect\_info: \[session: @session\_op…

---

## [Phoenix 1.7.11 longpoll and apache reverse proxy](https://forum.elixirforum.com/t/phoenix-1-7-11-longpoll-and-apache-reverse-proxy/61443)

<div class="topic-metadata">

**Author:** [@blset](https://forum.elixirforum.com/u/blset)\
**Replies:** 1\
**Last updated:** [February 4, 2024, 10:30am UTC](https://forum.elixirforum.com/t/phoenix-1-7-11-longpoll-and-apache-reverse-proxy/61443 "2024-02-04T10:30:00Z")

</div>

with an apache reverse proxy this configuration was ok until the last 1.7.11 with longpoll ProxyPreserveHost On ProxyRequests off ProxyPass /socket/ ws://192.168.190.21/socket/ ProxyPassReverse /socket/ ws://192.168.…

---

## [LiveView LongPoll Compression](https://forum.elixirforum.com/t/liveview-longpoll-compression/61059)

<div class="topic-metadata">

**Author:** [@user20230119](https://forum.elixirforum.com/u/user20230119)\
**Replies:** 1\
**Last updated:** [January 18, 2024, 12:19am UTC](https://forum.elixirforum.com/t/liveview-longpoll-compression/61059 "2024-01-18T00:19:09Z")

</div>

Is compression possible with longpoll? This does not work for longpoll. socket "/live", Phoenix.LiveView.Socket, longpoll: \[connect\_info: \[session: @session\_options\], compress: true\], websocket: \[connect\_info…

---

## [How do I pass keepalive: true to ranch\_tcp in my Endpoint configuration?](https://forum.elixirforum.com/t/how-do-i-pass-keepalive-true-to-ranch-tcp-in-my-endpoint-configuration/46106)

<div class="topic-metadata">

**Author:** [@smon](https://forum.elixirforum.com/u/smon)\
**Replies:** 1\
**Last updated:** [February 17, 2022, 2:49pm UTC](https://forum.elixirforum.com/t/how-do-i-pass-keepalive-true-to-ranch-tcp-in-my-endpoint-configuration/46106 "2022-02-17T14:49:38Z")

</div>

This is a repost of an issue (ReverseProxyPlug and longpoll · Issue #146 · tallarium/reverse\_proxy\_plug · GitHub) I opened . The forum is probably the better place, so I’ll link back in the issue at some point. I am not…

---

## [Phoenix Liveview in Proxy - Longpoll](https://forum.elixirforum.com/t/phoenix-liveview-in-proxy-longpoll/31060)

<div class="topic-metadata">

**Author:** [@david234](https://forum.elixirforum.com/u/david234)\
**Replies:** 2\
**Last updated:** [April 28, 2020, 3:42pm UTC](https://forum.elixirforum.com/t/phoenix-liveview-in-proxy-longpoll/31060 "2020-04-28T15:42:17Z")

</div>

We have been using Phoenix live view in one of our projects. It is deployed under Proxy. I find that WebSockets won’t work under a proxy. So alternate solution is using long poll. I want to know two things. we are us…

---

## [How to implement custom socket transport that uses long polling in Phoenix?](https://forum.elixirforum.com/t/how-to-implement-custom-socket-transport-that-uses-long-polling-in-phoenix/29206)

<div class="topic-metadata">

**Author:** [@DeadRat42](https://forum.elixirforum.com/u/DeadRat42)\
**Replies:** 5\
**Last updated:** [February 18, 2020, 7:25pm UTC](https://forum.elixirforum.com/t/how-to-implement-custom-socket-transport-that-uses-long-polling-in-phoenix/29206 "2020-02-18T19:25:14Z")

</div>

Hello! Can anyone help with making my own Socket adapter? there’s literally zero articles and projects on github doing this. I literally have no idea how would i implement custom long polling adapter, and how do i commun…

---

## [Longpool not working in Phoenix](https://forum.elixirforum.com/t/longpool-not-working-in-phoenix/24028)

<div class="topic-metadata">

**Author:** [@silviurosu](https://forum.elixirforum.com/u/silviurosu)\
**Replies:** 2\
**Last updated:** [July 18, 2019, 7:38am UTC](https://forum.elixirforum.com/t/longpool-not-working-in-phoenix/24028 "2019-07-18T07:38:37Z")

</div>

I can not figure out how to make phoenix sockets longpool work. My config is like this: in endpoint.ex: socket("/socket", Carts.ApiWeb.CartSocket, websocket: true, longpoll: true) in cart\_socket.ex: channel("cart:\*",…

---

## [Disable tokens for longpoll socket?](https://forum.elixirforum.com/t/disable-tokens-for-longpoll-socket/20156)

<div class="topic-metadata">

**Author:** [@ismaelga](https://forum.elixirforum.com/u/ismaelga)\
**Replies:** 0\
**Last updated:** [February 14, 2019, 10:52am UTC](https://forum.elixirforum.com/t/disable-tokens-for-longpoll-socket/20156 "2019-02-14T10:52:48Z")

</div>

Hey! Is there any way to disable tokens verification for a socket? I’m doing a phoenix app to serve as a mock for a service we use. And there’s a need to mock a longpolling route which I’m trying to do with phoenix cha…

---

## [Broadcast using LongPoll is failing](https://forum.elixirforum.com/t/broadcast-using-longpoll-is-failing/14400)

<div class="topic-metadata">

**Author:** [@clemensm](https://forum.elixirforum.com/u/clemensm)\
**Replies:** 4\
**Last updated:** [July 20, 2018, 6:21am UTC](https://forum.elixirforum.com/t/broadcast-using-longpoll-is-failing/14400 "2018-07-20T06:21:26Z")

</div>

Hi there I’m currently developing a small webapp using Phoenix to send mails to a bunch of contacts. In there I wanted to use a channel to update the send status (i.e. how many mails have already been sent etc). However…

---

## [Phoenix Channels in Distributed Systems](https://forum.elixirforum.com/t/phoenix-channels-in-distributed-systems/15114)

<div class="topic-metadata">

**Author:** [@tfischbach](https://forum.elixirforum.com/u/tfischbach)\
**Replies:** 1\
**Last updated:** [July 12, 2018, 3:56pm UTC](https://forum.elixirforum.com/t/phoenix-channels-in-distributed-systems/15114 "2018-07-12T15:56:26Z")

</div>

Hi, currently I am testing running a Phoenix application on a system with multiple connected nodes. There are some observations I’d like to confirm/questions I’d like to ask that I could not find documented anywhere. C…
