diff --git a/setup/start/nginx/nginx.conf b/setup/start/nginx/nginx.conf index b892a1611..ce923e9a4 100644 --- a/setup/start/nginx/nginx.conf +++ b/setup/start/nginx/nginx.conf @@ -24,6 +24,12 @@ http { sendfile on; + # timeout for client to finish sending headers + client_header_timeout 30s; + + # timeout for reading client request body (successive read timeout and not whole body!) + client_body_timeout 60s; + # keep-alive connections timeout in 65s. this is because many browsers timeout in 60 seconds keepalive_timeout 65s; diff --git a/src/server.js b/src/server.js index b44c93edc..5e51c813b 100644 --- a/src/server.js +++ b/src/server.js @@ -196,7 +196,7 @@ function initializeExpressSync() { router.get ('/api/v1/backups/:backupId', appsScope, routes.user.requireAdmin, routes.backups.download); // disable server socket "idle" timeout. we use the timeout middleware to handle timeouts on a route level - // we rely on nginx for timeouts on the TCP level + // we rely on nginx for timeouts on the TCP level (see client_header_timeout) httpServer.setTimeout(0); // upgrade handler