Skip to content

Conversation

@tylersmalley
Copy link
Contributor

@tylersmalley tylersmalley commented Jun 11, 2018

Node 8 changed the keepAlive default to 5 seconds from 5 minutes. This reverts that behavior.

Having this low of a keepAlive timeout is problematic for health checks. For example, if you have a Load Balancer health check on a 5-second interval, the initial request starts the keepAlive and it's possible a subsequent request uses the keepAlive and is destroyed before it has been completed.

hapijs/hapi#3738

Node 8 changed the keepAlive to default to 5 seconds from 5 minutes. This reverts that behavior.

Signed-off-by: Tyler Smalley <[email protected]>
}
});

// revert to previous 5m keepalive timeout in Node < 8
Copy link
Member

Choose a reason for hiding this comment

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

nit, 2m

Copy link
Contributor

@joegallo joegallo left a comment

Choose a reason for hiding this comment

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

LGTM

@jbudz
Copy link
Member

jbudz commented Jun 11, 2018

https://nodejs.org/api/http.html#http_server_keepalivetimeout has a blurb about it. New setting in Node 8. It mentions setting this to 0 for the same behavior as < 8 but 120 is effectively the same as it falls back to the timeout option above.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@tylersmalley tylersmalley merged commit c360fca into elastic:6.3 Jun 11, 2018
tylersmalley added a commit that referenced this pull request Jun 11, 2018
Node 8 changed the keepAlive to default to 5 seconds from 5 minutes. This reverts that behavior.

Signed-off-by: Tyler Smalley <[email protected]>
tylersmalley added a commit that referenced this pull request Jun 11, 2018
Node 8 changed the keepAlive to default to 5 seconds from 5 minutes. This reverts that behavior.

Signed-off-by: Tyler Smalley <[email protected]>
@tylersmalley
Copy link
Contributor Author

6.x/6.4: 83dd263
7.0: ec69a02

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

maryia-lapata pushed a commit to maryia-lapata/kibana that referenced this pull request Jun 25, 2018
Node 8 changed the keepAlive to default to 5 seconds from 5 minutes. This reverts that behavior.

Signed-off-by: Tyler Smalley <[email protected]>
jbudz pushed a commit to jbudz/kibana that referenced this pull request Mar 6, 2019
Node 8 changed the keepAlive to default to 5 seconds from 5 minutes. This reverts that behavior.

Signed-off-by: Tyler Smalley <[email protected]>
jbudz added a commit that referenced this pull request Mar 8, 2019
* Bump node to 6.17.0

* Resolve intermittent premature connection closed (#19808)

Node 8 changed the keepAlive to default to 5 seconds from 5 minutes. This reverts that behavior.

Signed-off-by: Tyler Smalley <[email protected]>

* 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants