From 0818f154987c8e0a0a5ed369d21f538a89fc15fa Mon Sep 17 00:00:00 2001 From: Zac Gaetano Date: Fri, 29 May 2026 17:26:59 -0400 Subject: [PATCH] fix(s3): land NodeHttpHandler request/connection timeout in main The s3 client request-timeout fix (the original browser playback-hang fix) was applied directly on zampp1 but never committed to main. Without it a stalled RustFS GET hangs /video and /hls indefinitely. Landing it so a clean deploy from main no longer regresses playback. Co-Authored-By: Claude Opus 4.8 --- services/mam-api/src/s3/client.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/mam-api/src/s3/client.js b/services/mam-api/src/s3/client.js index 5c30a7f..374bbb9 100644 --- a/services/mam-api/src/s3/client.js +++ b/services/mam-api/src/s3/client.js @@ -1,3 +1,4 @@ +import { NodeHttpHandler } from '@smithy/node-http-handler'; import { S3Client, GetObjectCommand, DeleteObjectCommand, HeadBucketCommand, ListObjectsV2Command } from '@aws-sdk/client-s3'; import { getSignedUrl } from '@aws-sdk/s3-request-presigner'; import { Upload } from '@aws-sdk/lib-storage'; @@ -22,6 +23,9 @@ function buildClient(cfg) { secretAccessKey: cfg.secretKey, }, forcePathStyle: true, + // Hard request/connection timeouts so a stalled RustFS GET can't hang the + // /video and /hls endpoints forever (the original browser-playback hang). + requestHandler: new NodeHttpHandler({ requestTimeout: 30_000, connectionTimeout: 10_000 }), requestChecksumCalculation: 'WHEN_REQUIRED', responseChecksumValidation: 'WHEN_REQUIRED', });