Increase req and res stream timeouts to 3 minutes
This commit is contained in:
@@ -18,6 +18,15 @@ app = express()
|
|||||||
|
|
||||||
app.use Metrics.http.monitor(logger)
|
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.
|
||||||
|
TIMEOUT = threeMinutes = 3 * 60 * 1000
|
||||||
|
app.use (req, res, next) ->
|
||||||
|
req.setTimeout TIMEOUT
|
||||||
|
res.setTimeout TIMEOUT
|
||||||
|
next()
|
||||||
|
|
||||||
app.post "/project/:project_id/compile", bodyParser.json(limit: "5mb"), CompileController.compile
|
app.post "/project/:project_id/compile", bodyParser.json(limit: "5mb"), CompileController.compile
|
||||||
app.delete "/project/:project_id", CompileController.clearCache
|
app.delete "/project/:project_id", CompileController.clearCache
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user