From 0bdc82c94852375198fc96b85b60787e4dfa4516 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Mon, 24 Jul 2023 11:32:30 +0100 Subject: [PATCH] Merge pull request #14022 from overleaf/bg-investigate-kubernetes-shutdown-keep-alive-requests close keepalive connections on docupdater shutdown GitOrigin-RevId: 4fd0bbaa2362a1116c11dae9a8b44f02b05b14a6 --- services/document-updater/app.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/document-updater/app.js b/services/document-updater/app.js index ead9669e59..3ade1ec285 100644 --- a/services/document-updater/app.js +++ b/services/document-updater/app.js @@ -131,6 +131,8 @@ app.use((req, res, next) => { { req, timeSinceShutdown: Date.now() - Settings.shutDownTime }, 'request received after shutting down' ) + // We don't want keep-alive connections to be kept open when the server is shutting down. + res.set('Connection', 'close') } next() })