From f6c2cfe727861513b84e6627151060bc6eade7f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Alby?= Date: Tue, 11 Jun 2019 15:13:42 +0200 Subject: [PATCH] Merge pull request #1848 from overleaf/sk-increase-compile-timeout-hard-limit-10 Increase compile socket timeout to 10 minutes GitOrigin-RevId: 93712c493c67bf54022df43175d331557b7cf49a --- services/web/app/src/Features/Compile/CompileController.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/web/app/src/Features/Compile/CompileController.js b/services/web/app/src/Features/Compile/CompileController.js index e81a110078..96833c07ff 100644 --- a/services/web/app/src/Features/Compile/CompileController.js +++ b/services/web/app/src/Features/Compile/CompileController.js @@ -31,12 +31,14 @@ const ClsiCookieManager = require('./ClsiCookieManager')( ) const Path = require('path') +const COMPILE_TIMEOUT_MS = 10 * 60 * 1000 + module.exports = CompileController = { compile(req, res, next) { if (next == null) { next = function(error) {} } - res.setTimeout(5 * 60 * 1000) + res.setTimeout(COMPILE_TIMEOUT_MS) const project_id = req.params.Project_id const isAutoCompile = !!(req.query != null ? req.query.auto_compile @@ -118,7 +120,7 @@ module.exports = CompileController = { if (next == null) { next = function(error) {} } - res.setTimeout(5 * 60 * 1000) + res.setTimeout(COMPILE_TIMEOUT_MS) const { submission_id } = req.params const options = {} if ((req.body != null ? req.body.rootResourcePath : undefined) != null) {