mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
Merge pull request #31567 from overleaf/ar-fb/handle-clsi-timeout-better
[clsi-lb,v1,clsi,web] handle clsi timeout better GitOrigin-RevId: 86aa1e01b8cb465b8b9332e17fb97c21849d0489
This commit is contained in:
@@ -37,7 +37,7 @@ app.use(Metrics.http.monitor(logger))
|
||||
// Compile requests can take longer than the default two
|
||||
// minutes (including file download time), so bump up the
|
||||
// timeout a bit.
|
||||
const TIMEOUT = 10 * 60 * 1000
|
||||
const TIMEOUT = 630 * 1000 // 10.5 minutes - 30 seconds download allowance
|
||||
app.use(function (req, res, next) {
|
||||
req.setTimeout(TIMEOUT)
|
||||
res.setTimeout(TIMEOUT)
|
||||
|
||||
@@ -609,6 +609,8 @@ async function _postToClsi(
|
||||
return { response: { compile: { status: 'compile-in-progress' } } }
|
||||
} else if (err.response.status === 503) {
|
||||
return { response: { compile: { status: 'unavailable' } } }
|
||||
} else if (err.response.status === 504) {
|
||||
return { response: { compile: { status: 'timedout' } } }
|
||||
} else {
|
||||
throw new OError('CLSI returned non-success code', {
|
||||
projectId,
|
||||
|
||||
@@ -30,7 +30,7 @@ const ClsiCookieManager = ClsiCookieManagerFactory(
|
||||
Settings.apis.clsi?.backendGroupName
|
||||
)
|
||||
|
||||
const COMPILE_TIMEOUT_MS = 10 * 60 * 1000
|
||||
const COMPILE_TIMEOUT_MS = 12 * 60 * 1000
|
||||
|
||||
const buildIdSchema = z.string().regex(/[a-z0-9-]/)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user