Skip to content

Commit c6cf497

Browse files
Merge pull request #136 from geoadmin/develop
New Release v1.8.1 - #patch
2 parents d99277c + 7ee4bba commit c6cf497

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- [`/rest/services/profile.json` and `/rest/services/profile.csv` GET/POST](#restservicesprofilejson-and-restservicesprofilecsv-getpost)
1919
- [Deploying the project and continuous integration](#deploying-the-project-and-continuous-integration)
2020
- [Deployment configuration](#deployment-configuration)
21+
- [Updating Packages](#updating-packages)
2122

2223
## Summary of the project
2324

@@ -117,6 +118,8 @@ The service is configured by Environment Variable:
117118
| ALTI_WORKERS | `0` | Number of workers. `0` or negative value means that the number of worker are computed from the number of cpu |
118119
| DFT_CACHE_HEADER | `public, max-age=86400` | Default cache settings for successful GET, HEAD and OPTIONS requests |
119120
| GUNICORN_WORKER_TMP_DIR | `None` | This should be set to an tmpfs file system for better performance. See https://docs.gunicorn.org/en/stable/settings.html#worker-tmp-dir. |
121+
| GUNICORN_KEEPALIVE | `2` | The [`keepalive`](https://docs.gunicorn.org/en/stable/settings.html#keepalive) setting passed to gunicorn. |
122+
120123

121124
## Updating Packages
122125

app/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ def strtobool(value):
3131

3232
VALID_SRID = [21781, 2056]
3333
GUNICORN_WORKER_TMP_DIR = os.getenv("GUNICORN_WORKER_TMP_DIR", None)
34+
GUNICORN_KEEPALIVE = int(os.getenv("GUNICORN_KEEPALIVE", '2'))

wsgi.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from app.app import app as application
66
from app.helpers import get_logging_cfg
77
from app.settings import ALTI_WORKERS
8+
from app.settings import GUNICORN_KEEPALIVE
89
from app.settings import GUNICORN_WORKER_TMP_DIR
910
from app.settings import HTTP_PORT
1011

@@ -42,6 +43,7 @@ def load(self):
4243
'"%(f)s" "%(a)s" %(L)ss',
4344
'worker_tmp_dir': GUNICORN_WORKER_TMP_DIR,
4445
'timeout': 60,
46+
'keepalive': GUNICORN_KEEPALIVE,
4547
'logconfig_dict': get_logging_cfg()
4648
}
4749
StandaloneApplication(application, options).run()

0 commit comments

Comments
 (0)