From cde815931fa85e031d0bcc0a5ee9aa556fe463b3 Mon Sep 17 00:00:00 2001 From: APIbase Date: Thu, 10 Sep 2026 03:09:34 +0000 Subject: [PATCH] INC-b0353f: increase probe timeout for uk-ea-flood-monitoring - Raise MAX_PROBE_TIMEOUT_MS from 15s to 25s (measured latency: HEAD up to 21.8s, GET 15-20s) - Set uk-ea-flood-monitoring provider timeout_ms to 25s - Root cause: slow TLS handshake on environment.data.gov.uk endpoint causes probes to fail - Previous fix (GET method) was correct but insufficient due to timeout ceiling Measurements: - GET with 15s timeout: FAIL (hits timeout wall) - GET with 20s timeout: OK (3.9s actual) - GET with 30s timeout: OK (7.2s actual) - HEAD varies: 5.2s to 21.8s --- src/config/provider-limits.json | 2 +- src/jobs/provider-health.job.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/config/provider-limits.json b/src/config/provider-limits.json index b58902fd..f9101721 100644 --- a/src/config/provider-limits.json +++ b/src/config/provider-limits.json @@ -3648,7 +3648,7 @@ "limit_proof": "Public UK Environment Agency real-time flood-monitoring REST API (environment.data.gov.uk/flood-monitoring); open data under the Open Government Licence with no requirement for registration per the API's own documentation, no authentication or API key required for any endpoint, no rate-limit headers returned in observed responses, no documented request quota on the API reference page (only a caching/availability note, no hard cap).", "probe": { "method": "GET", - "timeout_ms": 15000 + "timeout_ms": 25000 } }, "dogceo": { diff --git a/src/jobs/provider-health.job.ts b/src/jobs/provider-health.job.ts index 0f68a89b..444a9fa9 100644 --- a/src/jobs/provider-health.job.ts +++ b/src/jobs/provider-health.job.ts @@ -72,7 +72,9 @@ const HEALTH_CHECK_GET_TIMEOUT_MS = 12000; // initial-probe timeout above the 5s default (gdelt/semanticscholar below), // but never past this ceiling — an unbounded per-provider override would // turn one slow provider into a tick that never finishes. -const MAX_PROBE_TIMEOUT_MS = 15000; +// INC-b0353f: uk-ea-flood-monitoring requires 25s (HEAD/GET can take 20+s due to +// slow TLS handshake). Measured latency: up to 21.8s for HEAD, 15-20s for GET. +const MAX_PROBE_TIMEOUT_MS = 25000; const REDIS_HEALTH_TTL = 7200; // 2 hours const REDIS_LIMITS_TTL = 7200;