From a92d0976caaded2612e7a5896c553bc201f26684 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Sun, 10 Aug 2025 22:08:31 +0100 Subject: [PATCH] Increase map and AJAX request timeouts Extended the failsafe timeout for map loading from 10 to 60 seconds in the footer and increased the AJAX request timeout in leafembed.js from 30 to 50 seconds to better accommodate slow responses. --- application/views/interface_assets/footer.php | 4 ++-- assets/js/leaflet/leafembed.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 948d813e..c23b6011 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -795,14 +795,14 @@ if ($this->session->userdata('user_id') != null) { $('.warningOnSubmit').hide(); $('#map-success-alert').addClass('d-none'); - // Failsafe timeout to prevent stuck spinner (10 seconds) + // Failsafe timeout to prevent stuck spinner (60 seconds) const failsafeTimeout = setTimeout(function() { console.warn('Map loading timed out - forcing spinner hide'); $button.prop('disabled', false); $spinner.addClass('d-none'); $('.warningOnSubmit .warningOnSubmit_txt').text('Map loading timed out. Please try again.'); $('.warningOnSubmit').show(); - }, 10000); + }, 60000); var customdata = { 'dataPost': { diff --git a/assets/js/leaflet/leafembed.js b/assets/js/leaflet/leafembed.js index 4d54322f..432c6e39 100644 --- a/assets/js/leaflet/leafembed.js +++ b/assets/js/leaflet/leafembed.js @@ -73,7 +73,7 @@ function askForPlots(_url_qso, options={}) { type: 'POST', dataType: 'json', data: _dataPost, - timeout: 30000, // 30 second timeout + timeout: 50000, // 50 second timeout error: function(xhr, status, error) { console.log('[ERROR] ajax askForPlots() function return error:', status, error, xhr); // Call custom error callback if provided