diff options
| author | Louis Burda <quent.burda@gmail.com> | 2021-06-21 14:27:01 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2021-06-21 14:27:01 +0200 |
| commit | 6c07a3dbfa520ea0bba79c142060e6621257dcf5 (patch) | |
| tree | c18138e7f865ab009a96578a151664886c6644b4 /checker/src | |
| parent | 4079472724d24f1d5c02028b802c557a0fd2e53f (diff) | |
| download | enowars5-service-stldoctor-6c07a3dbfa520ea0bba79c142060e6621257dcf5.tar.gz enowars5-service-stldoctor-6c07a3dbfa520ea0bba79c142060e6621257dcf5.zip | |
change gunicorn conf to fight memory consumption via leak by restarting periodically
Diffstat (limited to 'checker/src')
| -rw-r--r-- | checker/src/gunicorn.conf.py | 11 | ||||
| -rw-r--r-- | checker/src/requirements.txt | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/checker/src/gunicorn.conf.py b/checker/src/gunicorn.conf.py index a382951..b049e48 100644 --- a/checker/src/gunicorn.conf.py +++ b/checker/src/gunicorn.conf.py @@ -1,7 +1,10 @@ -# This is a configuration file required by the checker. import multiprocessing -worker_class = "eventlet" -workers = multiprocessing.cpu_count()*2+1 + +worker_class = "gevent" +workers = multiprocessing.cpu_count() * 2 + 1 bind = "0.0.0.0:3031" timeout = 90 -keepalive = 3600
\ No newline at end of file +keepalive = 3600 +max_requests = 100 +preload_app = True +max_requests_jitter = 30 diff --git a/checker/src/requirements.txt b/checker/src/requirements.txt index 57cd50e..e88eeb1 100644 --- a/checker/src/requirements.txt +++ b/checker/src/requirements.txt @@ -10,7 +10,7 @@ enochecker-core==0.10.0 eventlet==0.30.2 Flask==1.1.2 greenlet==1.0.0 -gunicorn==20.1.0 +gunicorn[gevent] idna==2.10 itsdangerous==1.1.0 Jinja2==2.11.3 |
