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 @@ -181,3 +181,4 @@ The service is configured by Environment Variable:
181181| ALLOWED_DOMAINS | ` .* ` | Comma separated list of regex that are allowed as domain in Origin header |
182182| CACHE_CONTROL | ` public, max-age=31536000 ` | Cache Control header value of the GET /generate endpoint |
183183| CACHE_CONTROL_4XX | ` public, max-age=3600 ` | Cache Control header for 4XX responses |
184+ | 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 2121ALLOWED_DOMAINS_PATTERN = f"({ '|' .join (ALLOWED_DOMAINS )} )"
2222TRAP_HTTP_EXCEPTIONS = True
2323
24+ GUNICORN_KEEPALIVE = int (os .getenv ('GUNICORN_KEEPALIVE' , '2' ))
25+
2426CACHE_CONTROL = os .getenv ('CACHE_CONTROL' , 'public, max-age=31536000' )
2527CACHE_CONTROL_4XX = os .getenv ('CACHE_CONTROL_4XX' , 'public, max-age=3600' )
Original file line number Diff line number Diff line change 44
55from app .app import app as application
66from app .helpers .utils import get_logging_cfg
7+ from app .settings import GUNICORN_KEEPALIVE
78
89
910class StandaloneApplication (BaseApplication ): # pylint: disable=abstract-method
@@ -34,6 +35,7 @@ def load(self):
3435 'worker_class' : 'gevent' ,
3536 'workers' : 2 , # scaling horizontally is left to Kubernetes
3637 'timeout' : 60 ,
38+ 'keepalive' : GUNICORN_KEEPALIVE ,
3739 'logconfig_dict' : get_logging_cfg ()
3840 }
3941 StandaloneApplication (application , options ).run ()
You can’t perform that action at this time.
0 commit comments