Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Please expose keepAliveTimeout and headersTimeout without requiring a custom server #28633

Closed
tabuchid opened this issue Aug 30, 2021 · 0 comments · Fixed by #35827
Closed

Please expose keepAliveTimeout and headersTimeout without requiring a custom server #28633

tabuchid opened this issue Aug 30, 2021 · 0 comments · Fixed by #35827

Comments

@tabuchid
Copy link

tabuchid commented Aug 30, 2021

Describe the feature you'd like to request

When deploying behind a load balancer its good to configure the application server with a longer timeout than the load balancer. See AWS ALB reccomendation

We also recommend that you configure the idle timeout of your application to be larger than the idle timeout configured for the load balancer.

AWS defaults a ALB to a 60 second idle timeout so it would be desirable to configure next to have a 61 second timeout.

It looks like this has been discussed in a few places with little to no response from the maintainers:

Here is a discussion of a similar issue in node. nodejs/node#27363
and two blogs about people hitting similar issues with ALB's generating 502s using express servers where the solution was to increase the keepAliveTimeout.

Describe the solution you'd like

Allow setting keepAliveTimeout and headersTimeout.

Describe alternatives you've considered

Ugly hacks

We are doing something similar to patch, just an awk on the bundle after build. As patch replaces the whole file (IIRC) it’s more likely to break things than a regex search and insert.

#19618 (comment)

We're using patch-package to fix this issue, please make server.keepAliveTimeout a next.js settings 🙏🏻

#19618 (comment)

or setting the ALB/ELB to a timeout of 4 seconds

Heya the only solution I was able to find was to modify the IdleTimeout on the AWS ELB to be 4 seconds, i.e 1 second less than node's default 5 seconds.

#16544 (comment)

@vercel vercel locked and limited conversation to collaborators Aug 31, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants