From 93902c043afc06767ceec525031db2a523d62859 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sat, 25 Oct 2025 10:54:22 -0500 Subject: [PATCH] Increase LiveView socket timeout to 60 seconds - Set websocket timeout to 60000ms in endpoint configuration - Add timeout option to LiveSocket client configuration - Fixes timeout errors during initial map load with large packet count --- assets/js/app.js | 1 + lib/aprsme_web/endpoint.ex | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/js/app.js b/assets/js/app.js index d0b74cf..670e5f7 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -304,6 +304,7 @@ let liveSocket = new LiveSocket("/live", Socket, { longPollFallbackMs: 2500, params: { _csrf_token: csrfToken }, hooks: Hooks, + timeout: 60000, // 60 second timeout for slow initial loads }); // Show progress bar on live navigation and form submits diff --git a/lib/aprsme_web/endpoint.ex b/lib/aprsme_web/endpoint.ex index f519251..409c599 100644 --- a/lib/aprsme_web/endpoint.ex +++ b/lib/aprsme_web/endpoint.ex @@ -13,7 +13,7 @@ defmodule AprsmeWeb.Endpoint do ] socket "/live", Phoenix.LiveView.Socket, - websocket: [connect_info: [session: @session_options]], + websocket: [connect_info: [session: @session_options], timeout: 60_000], longpoll: [connect_info: [session: @session_options]] # Serve at "/" the static files from "priv/static" directory.