File tree Expand file tree Collapse file tree 3 files changed +5
-0
lines changed
Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -193,3 +193,4 @@ The service is configured by Environment Variable:
193193| GUNICORN_TMPFS_DIR | ` None` | The working directory for the gunicorn workers. |
194194| WSGI_WORKERS | ` 2` | The number of workers per CPU. |
195195| UNLISTED_ICON_SETS | | Comma separated list of icon set to un-list. Those sets won' t be listed in the /sets endpoint. |
196+ | GUNICORN_KEEPALIVE | `2` | The [`keepalive`](https://docs.gunicorn.org/en/stable/settings.html#keepalive) setting passed to gunicorn. |
Original file line number Diff line number Diff line change 2828os .environ ['LOGS_DIR' ] = LOGS_DIR # Set default if not set
2929LOGGING_CFG = os .getenv ('LOGGING_CFG' , 'logging-cfg-local.yml' )
3030
31+ GUNICORN_KEEPALIVE = int (os .getenv ('GUNICORN_KEEPALIVE' , '2' ))
32+
3133# Definition of the allowed domains for CORS implementation
3234ALLOWED_DOMAINS = os .getenv ('ALLOWED_DOMAINS' , r'.*' ).split (',' )
3335CACHE_CONTROL = os .getenv ('CACHE_CONTROL' , 'public, max-age=86400' )
Original file line number Diff line number Diff line change 44
55from app import app as application
66from app .helpers import get_logging_cfg
7+ from app .settings import GUNICORN_KEEPALIVE
78
89
910class StandaloneApplication (BaseApplication ): # pylint: disable=abstract-method
@@ -36,6 +37,7 @@ def load(self):
3637 'workers' : int (os .getenv ('WSGI_WORKERS' ,
3738 '2' )), # scaling horizontally is left to Kubernetes
3839 'timeout' : int (os .getenv ('WSGI_TIMEOUT' , '5' )),
40+ 'keepalive' : GUNICORN_KEEPALIVE ,
3941 'logconfig_dict' : get_logging_cfg (),
4042 'forwarded_allow_ips' : os .getenv ('FORWARED_ALLOW_IPS' , '*' ),
4143 'secure_scheme_headers' : {
You can’t perform that action at this time.
0 commit comments