Skip to content

Commit ebc60d1

Browse files
Merge pull request #604 from geoadmin/fix-PB-1943-ka
PB-1943: make keepalive timeout configurable.
2 parents d445e3d + b98126a commit ebc60d1

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,9 @@ The service is configured by Environment Variable:
506506
| STAC_BROWSER_BASE_PATH | `browser/index.html` | STAC Browser base path. |
507507
| GUNICORN_WORKERS | `2` | Number of Gunicorn workers |
508508
| 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. |
509-
| 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.
510-
| GUNICORN_GRACEFUL_TIMEOUT | `30` | The [`graceful_timeout`](https://docs.gunicorn.org/en/stable/settings.html#graceful-timeout) setting passed to gunicorn.
509+
| 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. |
510+
| GUNICORN_GRACEFUL_TIMEOUT | `30` | The [`graceful_timeout`](https://docs.gunicorn.org/en/stable/settings.html#graceful-timeout) setting passed to gunicorn. |
511+
| GUNICORN_KEEPALIVE | `2` | The [`keepalive`](https://docs.gunicorn.org/en/stable/settings.html#keepalive) setting passed to gunicorn. |
511512

512513
#### **Database settings**
513514

app/wsgi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def dump_stacks():
100100
'worker_tmp_dir': os.environ.get('GUNICORN_WORKER_TMP_DIR', None),
101101
'timeout': 60,
102102
'graceful_timeout': int(os.environ.get('GUNICORN_GRACEFUL_TIMEOUT', 30)),
103+
'keepalive': int(os.environ.get('GUNICORN_KEEPALIVE', 2)),
103104
'logconfig_dict': get_logging_config(),
104105
}
105106
StandaloneApplication(application, options).run()

0 commit comments

Comments
 (0)