Skip to content

Commit 5efa492

Browse files
authored
Merge pull request #82 from ModusCreateOrg/ADE-66
feat: Add 5-minute timeout for API Gateway integration and server
2 parents b79f053 + 5e9c3eb commit 5efa492

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

backend/src/iac/backend-stack.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ export class BackendStack extends cdk.Stack {
405405
const integrationOptions = {
406406
connectionType: apigateway.ConnectionType.VPC_LINK,
407407
vpcLink: vpcLink,
408+
timeout: cdk.Duration.seconds(300), // Adding 5-minute timeout (300 seconds)
408409
};
409410

410411
const getDocsIntegration = new apigateway.Integration({

backend/src/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ async function bootstrap() {
1414
// Configure JSON body parser with increased limits
1515
app.use(json({ limit: '3mb' })); // Increased from default 100kb to 3mb
1616

17+
// Set server timeout to 5 minutes (300,000 ms)
18+
app.getHttpAdapter().getInstance().timeout = 300000;
19+
1720
// Enable CORS
1821
app.enableCors({
1922
origin: [

0 commit comments

Comments
 (0)