mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-20 03:57:02 +08:00
[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:
@@ -29,7 +29,7 @@ mailman_hyperkitty_admin_db_pass: changeme
|
||||
mailman_hyperkitty_db_pass: changeme
|
||||
mailman_hyperkitty_cookie_key: changeme
|
||||
mailman_hyperkitty_archiver_key: changeme
|
||||
mailman_gunicorn_workers: 9
|
||||
mailman_gunicorn_workers: {{ num_cpus * 2 + 1 }}
|
||||
mailman_domains:
|
||||
- lists.example.com
|
||||
- lists.example.org
|
||||
|
||||
@@ -11,5 +11,5 @@ Type=simple
|
||||
User=mailman
|
||||
Group=mailman
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user