From 6cd111932b773eee365bc00949b742590365166e Mon Sep 17 00:00:00 2001 From: Chris Park Date: Thu, 22 Feb 2024 10:03:35 +1030 Subject: [PATCH 1/3] bump up timeout to 180 seconds to provide enough time to handle ten URLs in a chunk --- .../lib/recaching/prerender-recache-api-construct.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/prerender-fargate/lib/recaching/prerender-recache-api-construct.ts b/packages/prerender-fargate/lib/recaching/prerender-recache-api-construct.ts index 5166ee1a..102c1c16 100644 --- a/packages/prerender-fargate/lib/recaching/prerender-recache-api-construct.ts +++ b/packages/prerender-fargate/lib/recaching/prerender-recache-api-construct.ts @@ -80,7 +80,7 @@ export class PrerenderRecacheApi extends Construct { existingProducerLambdaObj: apiHandler, existingConsumerLambdaObj: new NodejsFunction(this, "consumer", { reservedConcurrentExecutions: options.maxConcurrentExecutions, - timeout: Duration.seconds(60), + timeout: Duration.seconds(120), }), deployDeadLetterQueue: false, queueProps: { visibilityTimeout: Duration.minutes(60) }, From cdfbccb8fc5fa23e47c079af4f1763d837e51104 Mon Sep 17 00:00:00 2001 From: Chris Park Date: Mon, 18 Mar 2024 12:05:30 +1030 Subject: [PATCH 2/3] Update SQS visibility timeout to the same as lambda's timeout. Otherwise, the queue message will get picked after 60 seconds by another lambda instance --- .../lib/recaching/prerender-recache-api-construct.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/prerender-fargate/lib/recaching/prerender-recache-api-construct.ts b/packages/prerender-fargate/lib/recaching/prerender-recache-api-construct.ts index 102c1c16..2e8dd7be 100644 --- a/packages/prerender-fargate/lib/recaching/prerender-recache-api-construct.ts +++ b/packages/prerender-fargate/lib/recaching/prerender-recache-api-construct.ts @@ -83,7 +83,7 @@ export class PrerenderRecacheApi extends Construct { timeout: Duration.seconds(120), }), deployDeadLetterQueue: false, - queueProps: { visibilityTimeout: Duration.minutes(60) }, + queueProps: { visibilityTimeout: Duration.minutes(120) }, }); } } From b441761d3b9e27d5200830534c05665cacbffb1d Mon Sep 17 00:00:00 2001 From: Chris Park Date: Mon, 18 Mar 2024 12:08:17 +1030 Subject: [PATCH 3/3] Revert "Update SQS visibility timeout to the same as lambda's timeout. Otherwise, the queue message will get picked after 60 seconds by another lambda instance" This reverts commit cdfbccb8fc5fa23e47c079af4f1763d837e51104. --- .../lib/recaching/prerender-recache-api-construct.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/prerender-fargate/lib/recaching/prerender-recache-api-construct.ts b/packages/prerender-fargate/lib/recaching/prerender-recache-api-construct.ts index 2e8dd7be..102c1c16 100644 --- a/packages/prerender-fargate/lib/recaching/prerender-recache-api-construct.ts +++ b/packages/prerender-fargate/lib/recaching/prerender-recache-api-construct.ts @@ -83,7 +83,7 @@ export class PrerenderRecacheApi extends Construct { timeout: Duration.seconds(120), }), deployDeadLetterQueue: false, - queueProps: { visibilityTimeout: Duration.minutes(120) }, + queueProps: { visibilityTimeout: Duration.minutes(60) }, }); } }