From 4ef099d2112c879a5d6192ce12d0f89c7107955a Mon Sep 17 00:00:00 2001 From: Branden Chan <33759007+brandenchan@users.noreply.github.com> Date: Mon, 11 Apr 2022 13:26:27 +0200 Subject: [PATCH] Reduce num REST API workers to accommodate smaller machines (#2400) * Reduce num REST API workers from 8 to 2 * Incorporate reviewer feedback --- docker-compose.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2a49246fb..1b2d05dc9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,7 +18,9 @@ services: - CONCURRENT_REQUEST_PER_WORKER depends_on: - elasticsearch - command: "/bin/bash -c 'sleep 10 && gunicorn rest_api.application:app -b 0.0.0.0 -k uvicorn.workers.UvicornWorker --workers 8 --timeout 180'" + # Starts REST API with only 2 workers so that it can be run on systems with just 4GB of memory + # If you need to handle large loads of incoming requests and have memory to spare, consider increasing the number of workers + command: "/bin/bash -c 'sleep 10 && gunicorn rest_api.application:app -b 0.0.0.0 -k uvicorn.workers.UvicornWorker --workers 2 --timeout 180'" elasticsearch: # This will start an empty elasticsearch instance (so you have to add your documents yourself) #image: "elasticsearch:7.9.2"