diff --git a/roles/mailman3/defaults/main.yml b/roles/mailman3/defaults/main.yml index cdb828b0b7..3bf7a620fd 100644 --- a/roles/mailman3/defaults/main.yml +++ b/roles/mailman3/defaults/main.yml @@ -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 diff --git a/roles/mailman3/templates/mailmanweb.service.j2 b/roles/mailman3/templates/mailmanweb.service.j2 index 157e902ad9..ff45926468 100644 --- a/roles/mailman3/templates/mailmanweb.service.j2 +++ b/roles/mailman3/templates/mailmanweb.service.j2 @@ -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