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', });