From e674a3ca22d451eafae78321171a332ce3066101 Mon Sep 17 00:00:00 2001 From: David McDonald Date: Tue, 16 Jun 2020 12:22:24 +0100 Subject: [PATCH] wip --- gunicorn_config.py | 2 +- manifest.yml.j2 | 8 ++++---- requirements-app.txt | 3 ++- scripts/paas_app_wrapper.sh | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/gunicorn_config.py b/gunicorn_config.py index d32eaba2d..aa45b7740 100644 --- a/gunicorn_config.py +++ b/gunicorn_config.py @@ -6,7 +6,7 @@ import gunicorn from gds_metrics.gunicorn import child_exit # noqa workers = 4 -worker_class = "eventlet" +worker_class = "gevent" worker_connections = 256 errorlog = "/home/vcap/logs/gunicorn_error.log" bind = "0.0.0.0:{}".format(os.getenv("PORT")) diff --git a/manifest.yml.j2 b/manifest.yml.j2 index 80c991309..f220947ce 100644 --- a/manifest.yml.j2 +++ b/manifest.yml.j2 @@ -1,6 +1,6 @@ {%- set app_vars = { - 'notify-api': { - 'NOTIFY_APP_NAME': 'api', + 'notify-api-canary1': { + 'NOTIFY_APP_NAME': 'api-canary1', 'disk_quota': '2G', 'sqlalchemy_pool_size': 30, 'routes': { @@ -12,8 +12,8 @@ 'health-check-invocation-timeout': 3, 'instances': { 'preview': None, - 'staging': None, - 'production': 25 + 'staging': 1, + 'production': 1 }, }, 'notify-api-db-migration': { diff --git a/requirements-app.txt b/requirements-app.txt index 15cb80641..6e980c583 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -10,13 +10,14 @@ Flask-Migrate==2.5.3 git+https://github.com/mitsuhiko/flask-sqlalchemy.git@500e732dd1b975a56ab06a46bd1a20a21e682262#egg=Flask-SQLAlchemy==2.3.2.dev20190108 Flask==1.1.2 click-datetime==0.2 -eventlet==0.25.2 +gevent==20.6.1 gunicorn==20.0.4 iso8601==0.1.12 itsdangerous==1.1.0 jsonschema==3.2.0 marshmallow-sqlalchemy==0.23.0 marshmallow==2.21.0 # pyup: <3 # v3 throws errors +psycogreen==1.0.2 psycopg2-binary==2.8.5 PyJWT==1.7.1 SQLAlchemy==1.3.17 diff --git a/scripts/paas_app_wrapper.sh b/scripts/paas_app_wrapper.sh index 9e4c7f3e0..65cc53f43 100755 --- a/scripts/paas_app_wrapper.sh +++ b/scripts/paas_app_wrapper.sh @@ -1,6 +1,6 @@ #!/bin/bash case $NOTIFY_APP_NAME in - api) + api|api-canary1) unset GUNICORN_CMD_ARGS exec scripts/run_app_paas.sh gunicorn -c /home/vcap/app/gunicorn_config.py application ;;