[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:
Michal Konecny 2024-07-03 17:02:51 +02:00
parent 756f69c048
commit 2c4f7c6968
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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