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

Bump keep-alive above default LBs #9749

Merged
merged 1 commit into from
Jan 4, 2025
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
2 changes: 1 addition & 1 deletion front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dev:all": "concurrently --kill-others \"cd ../types/ && npm run start\" \"sleep 20 && cd ../sdks/js/ && npm run start\" \"sleep 22 && next dev\" \"sleep 22 && tsx ./start_worker.ts\"",
"dev": "next dev",
"build": "next build",
"start": "next start --keepAliveTimeout 6000",
"start": "next start --keepAliveTimeout 610000",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The keep-alive timeout is being increased by ~100x (from 6s to 610s). While this matches the strategy from vercel/next.js#35827, we should:

  1. Add a comment in the code explaining why this specific value (610000) was chosen and how it relates to ALB timeouts
  2. Document the metrics we'll be monitoring to detect any resource exhaustion issues (e.g. connection pool metrics, memory usage)
  3. Consider adding an environment variable for this value to make it easier to adjust in production if needed:
Suggested change
"start": "next start --keepAliveTimeout 610000",
"start": "next start --keepAliveTimeout ${NEXT_KEEP_ALIVE_TIMEOUT:-610000}",

"start:worker": "tsx ./start_worker.ts",
"lint": "next lint",
"docs": "npx next-swagger-doc-cli swagger.json 2>&1 | tee /dev/stderr | grep -E \"YAML.*Error\" && { echo \"Could not generate swagger because of errors\" && exit 1; } || { npx @redocly/cli@1.25.5 lint --extends recommended-strict --skip-rule operation-operationId --lint-config error public/swagger.json && npm run format; }",
Expand Down
Loading