diff --git a/src/components/backend-core/src/microservice-proxy.ts b/src/components/backend-core/src/microservice-proxy.ts index 3fcb2b4f..92489b75 100644 --- a/src/components/backend-core/src/microservice-proxy.ts +++ b/src/components/backend-core/src/microservice-proxy.ts @@ -800,9 +800,6 @@ function canRetryProviderHttpTunnel(method: string, targetPath: string): boolean function providerHttpTunnelWaitMs(service: MicroserviceConfig, attempt: number, retryable: boolean): number { const baseTimeoutMs = Math.max(1000, service.backend.timeoutMs); - if (!retryable) return baseTimeoutMs + 3000; - if (attempt === 1) return Math.min(baseTimeoutMs + 3000, Math.max(5000, Math.floor(baseTimeoutMs * 0.45))); - if (attempt === 2) return Math.min(baseTimeoutMs + 3000, Math.max(6000, Math.floor(baseTimeoutMs * 0.7))); return baseTimeoutMs + 3000; } @@ -946,7 +943,7 @@ async function providerHttpTunnelMicroserviceResponse( const durationMs = Date.now() - startedAt; if (message === null) { attempts.push({ attempt, requestId, ok: false, reason: reason ?? "timeout", durationMs, timeoutMs }); - if (retryable && tunnelFailureRetryable(reason) && attempt < maxAttempts) { + if (retryable && reason !== "timeout" && tunnelFailureRetryable(reason) && attempt < maxAttempts) { logger("warn", "http_tunnel_retry", { providerId: service.providerId, serviceId: service.id,