mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #6029 from overleaf/ab-docstore-socket-leak
Set timeout values on docstore server GitOrigin-RevId: ea7a29532e53964b5b66367617e797160711c063
This commit is contained in:
parent
1fd0a26d29
commit
493b4ecfde
2 changed files with 8 additions and 3 deletions
3
services/docstore/.gitignore
vendored
3
services/docstore/.gitignore
vendored
|
@ -3,3 +3,6 @@ forever
|
|||
|
||||
# managed by dev-environment$ bin/update_build_scripts
|
||||
.npmrc
|
||||
|
||||
# Jetbrains IDEs
|
||||
.idea
|
||||
|
|
|
@ -46,8 +46,6 @@ app.param('doc_id', function (req, res, next, docId) {
|
|||
}
|
||||
})
|
||||
|
||||
Metrics.injectMetricsRoute(app)
|
||||
|
||||
app.get('/project/:project_id/doc-deleted', HttpController.getAllDeletedDocs)
|
||||
app.get('/project/:project_id/doc', HttpController.getAllDocs)
|
||||
app.get('/project/:project_id/ranges', HttpController.getAllRanges)
|
||||
|
@ -106,13 +104,17 @@ if (!module.parent) {
|
|||
mongodb
|
||||
.waitForDb()
|
||||
.then(() => {
|
||||
app.listen(port, host, function (err) {
|
||||
const server = app.listen(port, host, function (err) {
|
||||
if (err) {
|
||||
logger.fatal({ err }, `Cannot bind to ${host}:${port}. Exiting.`)
|
||||
process.exit(1)
|
||||
}
|
||||
return logger.info(`Docstore starting up, listening on ${host}:${port}`)
|
||||
})
|
||||
server.timeout = 120000
|
||||
server.keepAliveTimeout = 5000
|
||||
server.requestTimeout = 60000
|
||||
server.headersTimeout = 60000
|
||||
})
|
||||
.catch(err => {
|
||||
logger.fatal({ err }, 'Cannot connect to mongo. Exiting.')
|
||||
|
|
Loading…
Reference in a new issue