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/pyproject.toml b/pyproject.toml index 9b93af9..5a89bef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ requests = "^2.28.1" Flask = "~2.2.5" pydantic = "^2.0.2" flask-cors = "^4.0.0" -werkzeug = "~2.2.2" # debugpy is broken with werkzeug 2.3.x so pin this manually +werkzeug = "~2.2.3" # debugpy is broken with werkzeug 2.3.x so pin this manually [tool.poetry.group.dev.dependencies] coverage = "^7.2.2" diff --git a/run.bash b/run.bash index b62692d..745e1ee 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}"