[mailman3] Improve the gunicorn setup
Use the recommended CPU*2+1 amount of workers and limit max requests done. After that the gunicorn reloads itself and free up all the memory. Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This commit is contained in:
parent
756f69c048
commit
2c4f7c6968
2 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ mailman_hyperkitty_admin_db_pass: changeme
|
||||||
mailman_hyperkitty_db_pass: changeme
|
mailman_hyperkitty_db_pass: changeme
|
||||||
mailman_hyperkitty_cookie_key: changeme
|
mailman_hyperkitty_cookie_key: changeme
|
||||||
mailman_hyperkitty_archiver_key: changeme
|
mailman_hyperkitty_archiver_key: changeme
|
||||||
mailman_gunicorn_workers: 9
|
mailman_gunicorn_workers: {{ num_cpus * 2 + 1 }}
|
||||||
mailman_domains:
|
mailman_domains:
|
||||||
- lists.example.com
|
- lists.example.com
|
||||||
- lists.example.org
|
- lists.example.org
|
||||||
|
|
|
@ -11,5 +11,5 @@ Type=simple
|
||||||
User=mailman
|
User=mailman
|
||||||
Group=mailman
|
Group=mailman
|
||||||
WorkingDirectory=/etc/mailman3
|
WorkingDirectory=/etc/mailman3
|
||||||
ExecStart=/usr/bin/gunicorn --timeout 1000 --workers={{ mailman_gunicorn_workers }} --forwarded-allow-ips="*" mailman_web.wsgi
|
ExecStart=/usr/bin/gunicorn --max-requests 50000 --timeout 1000 --workers={{ mailman_gunicorn_workers }} --forwarded-allow-ips="*" mailman_web.wsgi
|
||||||
ExecStop=/bin/kill -s TERM $MAINPID
|
ExecStop=/bin/kill -s TERM $MAINPID
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue