From a30f34be7175499ba1e74e9c0f75b264ae14410d Mon Sep 17 00:00:00 2001 From: Eric Mc Sween <5454374+emcsween@users.noreply.github.com> Date: Mon, 23 Oct 2023 08:42:55 -0400 Subject: [PATCH] Merge pull request #15366 from overleaf/em-real-time-keepalive-timeout Increase the keepalive timeout on real-time GitOrigin-RevId: 7b1cfb2da3dc0c02fb0bd1d0fa3368961faa412e --- services/real-time/app.js | 1 + services/real-time/config/settings.defaults.js | 1 + 2 files changed, 2 insertions(+) diff --git a/services/real-time/app.js b/services/real-time/app.js index 2a024abc57..2373abb613 100644 --- a/services/real-time/app.js +++ b/services/real-time/app.js @@ -49,6 +49,7 @@ DeploymentManager.initialise() const app = express() const server = require('http').createServer(app) +server.keepAliveTimeout = Settings.keepAliveTimeoutMs const io = require('socket.io').listen(server, { logger: socketIoLogger, }) diff --git a/services/real-time/config/settings.defaults.js b/services/real-time/config/settings.defaults.js index b60655a24a..4252a8765c 100644 --- a/services/real-time/config/settings.defaults.js +++ b/services/real-time/config/settings.defaults.js @@ -166,6 +166,7 @@ const settings = { behindProxy: process.env.BEHIND_PROXY === 'true', trustedProxyIps: process.env.TRUSTED_PROXY_IPS, + keepAliveTimeoutMs: parseInt(process.env.KEEPALIVE_TIMEOUT_MS ?? '5000', 10), } // console.log settings.redis