diff --git a/container.requirements.txt b/container.requirements.txt index a986da5..121ada7 100644 --- a/container.requirements.txt +++ b/container.requirements.txt @@ -1,3 +1,4 @@ gunicorn==21.2.0 +gevent==23.9.1 pysam>=0.22.0,<0.23.0 fasta-checksum-utils>=0.3.1,<0.4 diff --git a/run.bash b/run.bash index b62692d..00373c2 100644 --- a/run.bash +++ b/run.bash @@ -6,12 +6,14 @@ # Start Celery worker with log level dependent on BENTO_DEBUG echo "[bento_wes] [entrypoint] Starting celery worker" celery_log_level="INFO" +gunicorn_log_level="info" if [[ "${BENTO_DEBUG}" == "true" || "${BENTO_DEBUG}" == "True" || "${BENTO_DEBUG}" == "1" ]]; then celery_log_level="DEBUG" + gunicorn_log_level="debug" fi celery --app bento_wes.app worker --loglevel="${celery_log_level}" & @@ -20,6 +22,9 @@ echo "[bento_wes] [entrypoint] Starting gunicorn" # using 1 worker, multiple threads # see https://stackoverflow.com/questions/38425620/gunicorn-workers-and-threads gunicorn bento_wes.app:application \ + --log-level "${gunicorn_log_level}" \ + --timeout 660 \ --workers 1 \ + --worker-class 'gevent' \ --threads "$(( 2 * $(nproc --all) + 1))" \ - --bind "0.0.0.0:${INTERNAL_PORT}" + --bind "0.0.0.0:${INTERNAL_PORT}" \