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
These timeouts cause that established websocket connections are closed after roughly 60 seconds.
if you inspect the websocket connection via Wireshark, you see that nodejs just sends:
HTTP/1.1 408 Request Timeout
Connection: close
Through the websocket connection after the timeout.
The simplest workaround to prevent this, is to set both timeouts to zero:
const app = express();
[...]
const server = app.listen(process.env.SERVER_PORT);
// disable timeouts as otherwise websocket connections are closed after ~60-90 seconds
server.headersTimeout = 0;
server.requestTimeout = 0;
Other libs actually implemented some handling for these cases: e.g. vercel/next.js@486b362
It would be nice if this could be somehow addressed as part of this lib.
The text was updated successfully, but these errors were encountered:
With Nodejs 18 another set of http timeouts have been introduced:
headersTimeout
requestTimeout
see: https://nodejs.org/en/blog/release/v18.0.0/#http-timeouts
These timeouts cause that established websocket connections are closed after roughly 60 seconds.
if you inspect the websocket connection via Wireshark, you see that nodejs just sends:
Through the websocket connection after the timeout.
The simplest workaround to prevent this, is to set both timeouts to zero:
Other libs actually implemented some handling for these cases: e.g. vercel/next.js@486b362
It would be nice if this could be somehow addressed as part of this lib.
The text was updated successfully, but these errors were encountered: