diff --git a/services/docstore/.gitignore b/services/docstore/.gitignore index 80bac793a7..84bf300f7f 100644 --- a/services/docstore/.gitignore +++ b/services/docstore/.gitignore @@ -3,3 +3,6 @@ forever # managed by dev-environment$ bin/update_build_scripts .npmrc + +# Jetbrains IDEs +.idea diff --git a/services/docstore/app.js b/services/docstore/app.js index 75154471be..fa6771ca53 100644 --- a/services/docstore/app.js +++ b/services/docstore/app.js @@ -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.')