Conversation
c24cb89 to
0ddca20
Compare
Default value is 90s if not overriden in configuration. Application should have larger keep alive timeout than the reverse proxy or load balancer.
0ddca20 to
a304f18
Compare
petemoore
approved these changes
Nov 17, 2023
Member
petemoore
left a comment
There was a problem hiding this comment.
Got to be worth a try. We can always back out if it doesn't help. Thanks Yarik!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tweaking
server.keepAliveTimeoutto fix downstream errors in reverse proxy and load balancer.Default node's http
server.keepAliveTimeoutis5swhich might be an issue when working behind a reverse proxy which has bigger timeouts.To reduce number of
502errors, application's keep alive timeout should be larger than the one of the reverse proxy,and that in turn, should be larger than the Load Balancer's one.
This introduces new configuration option for server:
KEEP_ALIVE_TIMEOUT_SECONDSthat can be used in deployment-specific scenarios.Related to #6682
Load Balancer (GLB) has
10minkeep alive timeoutnginx reverse proxy (iprepd in fxci) has
2minkeep alive timeouttaskcluster services are using default node timeout which is
5sSo what happens is that each of the downstream servers tries to keep the connection open to the upstream server, but if request comes in right before this time is out, the connection would be closed, and proxy server would not have a chance to read the response back.
So Ideally GLB 10min -> reverse proxy 10min+X -> app 10min+X+Y to make this chain work without high number of 502s