Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(alb-timeout): increase server timeout above the alb timeout NV-2265 #3372

Merged
merged 1 commit into from
May 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions apps/api/src/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ export async function bootstrap(expressApp?): Promise<INestApplication> {
app.useLogger(app.get(PinoLogger));
app.flushLogs();

const server = app.getHttpServer();
Logger.verbose(`Server timeout: ${server.timeout}`);
server.keepAliveTimeout = 61 * 1000;
Logger.verbose(`Server keepAliveTimeout: ${server.keepAliveTimeout / 1000}s `);
server.headersTimeout = 65 * 1000;
Logger.verbose(`Server headersTimeout: ${server.headersTimeout / 1000}s `);

if (process.env.SENTRY_DSN) {
app.use(Sentry.Handlers.requestHandler());
app.use(Sentry.Handlers.tracingHandler());
Expand Down