From efbc5c77121f463913a202e69a1e4c19e4455b08 Mon Sep 17 00:00:00 2001 From: Karol Chojnowski Date: Wed, 13 Apr 2022 14:49:33 +0200 Subject: [PATCH] Use `gthread` worker (#107) --- Makefile | 2 +- Pipfile | 3 +-- ethtx_ce/start-reload.sh | 2 +- ethtx_ce/start.sh | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) mode change 100644 => 100755 ethtx_ce/start-reload.sh diff --git a/Makefile b/Makefile index f844285..8f07e06 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ run-local: run-prod: fuser -k 5000/tcp || true - PYTHONPATH=./ethtx_ce pipenv run gunicorn --workers 4 --max-requests 4000 --timeout 600 --bind :5000 app.wsgi:app + PYTHONPATH=./ethtx_ce pipenv run gunicorn -k gthread --workers 4 --max-requests 4000 --timeout 600 --bind :5000 app.wsgi:app run-docker: fuser -k 5000/tcp || true diff --git a/Pipfile b/Pipfile index 75d0cf5..94103c5 100644 --- a/Pipfile +++ b/Pipfile @@ -9,11 +9,10 @@ web3 = "==5.26.0" python-dotenv = "*" flask = ">=2.0.2" werkzeug = ">=2.0.2" -gunicorn = ">=20.1.0" +gunicorn = {version = ">=20.1.0", extras = ["gthread"]} flask-httpauth = ">=4.5.0" gitpython = ">=3.1.24" jsonpickle = ">=2.0.0" -meinheld = ">=1.0.2" [dev-packages] black = "==21.12b0" diff --git a/ethtx_ce/start-reload.sh b/ethtx_ce/start-reload.sh old mode 100644 new mode 100755 index d326543..21ba5a1 --- a/ethtx_ce/start-reload.sh +++ b/ethtx_ce/start-reload.sh @@ -3,4 +3,4 @@ set -e # Start Gunicorn echo "Starting Gunicorn..." -exec pipenv run gunicorn "--reload" -k egg:meinheld#gunicorn_worker -c "$GUNICORN_CONF" "$APP_MODULE" \ No newline at end of file +exec pipenv run gunicorn "--reload" -k gthread -c "$GUNICORN_CONF" "$APP_MODULE" \ No newline at end of file diff --git a/ethtx_ce/start.sh b/ethtx_ce/start.sh index 2e0f46d..1e58c81 100644 --- a/ethtx_ce/start.sh +++ b/ethtx_ce/start.sh @@ -3,4 +3,4 @@ set -e # Start Gunicorn echo "Starting Gunicorn..." -exec pipenv run gunicorn -k egg:meinheld#gunicorn_worker -c "$GUNICORN_CONF" "$APP_MODULE" \ No newline at end of file +exec pipenv run gunicorn -k gthread -c "$GUNICORN_CONF" "$APP_MODULE" \ No newline at end of file