From f8b53719b48cfc7d89cacbd38711299c410db503 Mon Sep 17 00:00:00 2001 From: Adrien Kunysz Date: Thu, 18 Sep 2025 12:38:36 +0200 Subject: [PATCH 1/2] Fix broken table. Github is still able to render the table correctly without the terminating pipe on each line so it does not really matter. But that's a little nicer still. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 96131264..9337e0f2 100644 --- a/README.md +++ b/README.md @@ -506,8 +506,8 @@ The service is configured by Environment Variable: | STAC_BROWSER_BASE_PATH | `browser/index.html` | STAC Browser base path. | | GUNICORN_WORKERS | `2` | Number of Gunicorn workers | | GUNICORN_WORKER_TMP_DIR | `None` | Path to a tmpfs directory for Gunicorn. If `None` let gunicorn decide which path to use. See https://docs.gunicorn.org/en/stable/settings.html#worker-tmp-dir. | -| GUNICORN_STACK_DUMP_DELAY | `29` | Upon exit, how long to wait before logging stack traces. The default is one second less than `GUNICORN_GRACEFUL_TIMEOUT`. Setting this to a value equal or greater to `GUNICORN_GRACEFUL_TIMEOUT` effectively disables stack dumping. -| GUNICORN_GRACEFUL_TIMEOUT | `30` | The [`graceful_timeout`](https://docs.gunicorn.org/en/stable/settings.html#graceful-timeout) setting passed to gunicorn. +| GUNICORN_STACK_DUMP_DELAY | `29` | Upon exit, how long to wait before logging stack traces. The default is one second less than `GUNICORN_GRACEFUL_TIMEOUT`. Setting this to a value equal or greater to `GUNICORN_GRACEFUL_TIMEOUT` effectively disables stack dumping. | +| GUNICORN_GRACEFUL_TIMEOUT | `30` | The [`graceful_timeout`](https://docs.gunicorn.org/en/stable/settings.html#graceful-timeout) setting passed to gunicorn. | #### **Database settings** From b98126a875e924df7765508f9ac52eb72c698f59 Mon Sep 17 00:00:00 2001 From: Adrien Kunysz Date: Thu, 18 Sep 2025 12:37:35 +0200 Subject: [PATCH 2/2] PB-1943: make keepalive timeout configurable. The default is 2 and not really suitable when we have a reverses proxy in front with a higher idle connection timeout. --- README.md | 1 + app/wsgi.py | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 9337e0f2..4e118e11 100644 --- a/README.md +++ b/README.md @@ -508,6 +508,7 @@ The service is configured by Environment Variable: | GUNICORN_WORKER_TMP_DIR | `None` | Path to a tmpfs directory for Gunicorn. If `None` let gunicorn decide which path to use. See https://docs.gunicorn.org/en/stable/settings.html#worker-tmp-dir. | | GUNICORN_STACK_DUMP_DELAY | `29` | Upon exit, how long to wait before logging stack traces. The default is one second less than `GUNICORN_GRACEFUL_TIMEOUT`. Setting this to a value equal or greater to `GUNICORN_GRACEFUL_TIMEOUT` effectively disables stack dumping. | | GUNICORN_GRACEFUL_TIMEOUT | `30` | The [`graceful_timeout`](https://docs.gunicorn.org/en/stable/settings.html#graceful-timeout) setting passed to gunicorn. | +| GUNICORN_KEEPALIVE | `2` | The [`keepalive`](https://docs.gunicorn.org/en/stable/settings.html#keepalive) setting passed to gunicorn. | #### **Database settings** diff --git a/app/wsgi.py b/app/wsgi.py index c0e09da3..fd90ef59 100755 --- a/app/wsgi.py +++ b/app/wsgi.py @@ -100,6 +100,7 @@ def dump_stacks(): 'worker_tmp_dir': os.environ.get('GUNICORN_WORKER_TMP_DIR', None), 'timeout': 60, 'graceful_timeout': int(os.environ.get('GUNICORN_GRACEFUL_TIMEOUT', 30)), + 'keepalive': int(os.environ.get('GUNICORN_KEEPALIVE', 2)), 'logconfig_dict': get_logging_config(), } StandaloneApplication(application, options).run()