Ver código fonte

Merge pull request #15351 from overleaf/em-graceful-shutdown

Web graceful shutdown adjustments

GitOrigin-RevId: f940f73933065060956b5797cc43b14faaf4ac60
Eric Mc Sween 2 anos atrás
pai
commit
37db50b787
2 arquivos alterados com 3 adições e 5 exclusões
  1. 1 1
      develop/dev.env
  2. 2 4
      services/web/config/settings.defaults.js

+ 1 - 1
develop/dev.env

@@ -4,7 +4,7 @@ CONTACTS_HOST=contacts
 DOCSTORE_HOST=docstore
 DOCUMENT_UPDATER_HOST=document-updater
 FILESTORE_HOST=filestore
-GRACEFUL_SHUTDOWN_DELAY=0
+GRACEFUL_SHUTDOWN_DELAY_SECONDS=0
 HISTORY_V1_HOST=history-v1
 LISTEN_ADDRESS=0.0.0.0
 MONGO_HOST=mongo

+ 2 - 4
services/web/config/settings.defaults.js

@@ -550,10 +550,8 @@ module.exports = {
   behindProxy: false,
 
   // Delay before closing the http server upon receiving a SIGTERM process signal.
-  gracefulShutdownDelayInMs: parseInt(
-    process.env.GRACEFUL_SHUTDOWN_DELAY || 30 * seconds,
-    10
-  ),
+  gracefulShutdownDelayInMs:
+    parseInt(process.env.GRACEFUL_SHUTDOWN_DELAY_SECONDS ?? '5', 10) * seconds,
 
   // Expose the hostname in the `X-Served-By` response header
   exposeHostname: process.env.EXPOSE_HOSTNAME === 'true',