Reduce num REST API workers to accommodate smaller machines (#2400)

* Reduce num REST API workers from 8 to 2

* Incorporate reviewer feedback
This commit is contained in:
Branden Chan 2022-04-11 13:26:27 +02:00 committed by GitHub
parent b94d9effaf
commit 4ef099d211
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"