From 288e8a65f33f2586c90ca11c91fd9b969f076135 Mon Sep 17 00:00:00 2001 From: JeLuF Date: Mon, 14 Nov 2022 23:18:03 +0100 Subject: [PATCH] Incr. Server State Validtiy to 90s By default, healthCheck() is run every 5s. On background tabs, this may get extended. My tests have shown pings every 60s. The ping was older than 10s, so the condition in line 490 evaluates to `false` and the client tries to access the stream before the server is ready. By increasing the validity this can be avoided - at least until the browser runs the healthcheck even less often. See https://discord.com/channels/1014774730907209781/1041811939380178964/1041812021018120262 for the analysis. --- ui/media/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/media/js/main.js b/ui/media/js/main.js index 0f0fbb51..fe14d50e 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -444,7 +444,7 @@ async function doMakeImage(task) { const RETRY_DELAY_IF_BUFFER_IS_EMPTY = 1000 // ms const RETRY_DELAY_IF_SERVER_IS_BUSY = 30 * 1000 // ms, status_code 503, already a task running const TASK_START_DELAY_ON_SERVER = 1500 // ms - const SERVER_STATE_VALIDITY_DURATION = 10 * 1000 // ms + const SERVER_STATE_VALIDITY_DURATION = 90 * 1000 // ms const reqBody = task.reqBody const batchCount = task.batchCount