You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
As described in #1368, starting from Node v8, the server will disconnect the socket after 5 seconds of idling. Re-establishing the socket seems to take something in the order of tenths of seconds, making SPA prerendering requests with more than 5 seconds in between taking considerably longer than necessary (e.g. >1 second).
I suggest setting the keepAliveTimeout to a higher value, or to 0 or to make it configurable.
Update: also, the timeout property (https://nodejs.org/api/http.html#http_server_timeout) should be configurable. By default, the server-socket will timeout after 2 minutes, even if the keepAliveTimeout is set to 0.
The text was updated successfully, but these errors were encountered:
aloker
changed the title
Configure keepAliveTimeout on HTTP server (Node 8+)
Configure keepAliveTimeout on HTTP server (Node 8+) to prevent increased delay after 5 seconds
Feb 18, 2018
aloker
changed the title
Configure keepAliveTimeout on HTTP server (Node 8+) to prevent increased delay after 5 seconds
Configure keepAliveTimeout/timeout on HTTP server (Node 8+) to prevent increased delay after idling
Feb 18, 2018
Uh oh!
There was an error while loading. Please reload this page.
See https://nodejs.org/dist/latest-v8.x/docs/api/http.html#http_server_keepalivetimeout
As described in #1368, starting from Node v8, the server will disconnect the socket after 5 seconds of idling. Re-establishing the socket seems to take something in the order of tenths of seconds, making SPA prerendering requests with more than 5 seconds in between taking considerably longer than necessary (e.g. >1 second).
I suggest setting the keepAliveTimeout to a higher value, or to 0 or to make it configurable.
Update: also, the
timeout
property (https://nodejs.org/api/http.html#http_server_timeout) should be configurable. By default, the server-socket will timeout after 2 minutes, even if the keepAliveTimeout is set to 0.The text was updated successfully, but these errors were encountered: