slow restart time for mailmanweb
Debian 11.2, Mailman 3.3.5, Python 3.9.2, MariaDB 10.5.12-0+deb11u1
On a Debian system running MariaDB, mailman3 restarts quickly but mailmanweb takes about 90 seconds:
root@myhost # time systemctl restart mailmanweb
real 1m30.156s user 0m0.013s sys 0m0.000s
The daemon.log has a timeout error:
Dec 28 12:16:01 myhost systemd[1]: Stopping GNU Mailman Web UI... Dec 28 12:16:03 myhost uwsgi[409333]: [uWSGI] getting INI configuration from /etc/mailman3/uwsgi.ini Dec 28 12:17:31 myhost systemd[1]: mailmanweb.service: State 'stop-sigterm' timed out. Killing. Dec 28 12:17:31 myhost systemd[1]: mailmanweb.service: Killing process 409333 (uwsgi) with signal SIGKILL. Dec 28 12:17:31 myhost systemd[1]: mailmanweb.service: Killing process 418249 (uwsgi) with signal SIGKILL. Dec 28 12:17:31 myhost systemd[1]: mailmanweb.service: Killing process 418250 (uwsgi) with signal SIGKILL. Dec 28 12:17:31 myhost systemd[1]: mailmanweb.service: Killing process 418252 (sh) with signal SIGKILL. Dec 28 12:17:31 myhost systemd[1]: mailmanweb.service: Killing process 418254 (mailman-web) with signal SIGKILL. Dec 28 12:17:31 myhost systemd[1]: mailmanweb.service: Killing process 418258 (mailman-web) with signal SIGKILL. Dec 28 12:17:31 myhost systemd[1]: mailmanweb.service: Killing process 418260 (mailman-web) with signal SIGKILL. Dec 28 12:17:31 myhost systemd[1]: mailmanweb.service: Killing process 418261 (mailman-web) with signal SIGKILL. Dec 28 12:17:31 myhost systemd[1]: mailmanweb.service: Killing process 418262 (mailman-web) with signal SIGKILL. Dec 28 12:17:31 myhost systemd[1]: mailmanweb.service: Killing process 418263 (mailman-web) with signal SIGKILL. Dec 28 12:17:31 myhost systemd[1]: mailmanweb.service: Killing process 418264 (mailman-web) with signal SIGKILL. Dec 28 12:17:31 myhost systemd[1]: mailmanweb.service: Killing process 418265 (mailman-web) with signal SIGKILL. Dec 28 12:17:31 myhost systemd[1]: mailmanweb.service: Killing process 418253 (uwsgi) with signal SIGKILL. Dec 28 12:17:31 myhost systemd[1]: mailmanweb.service: Main process exited, code=killed, status=9/KILL Dec 28 12:17:31 myhost systemd[1]: mailmanweb.service: Failed with result 'timeout'. Dec 28 12:17:31 myhost systemd[1]: Stopped GNU Mailman Web UI.
Here is /etc/systemd/system/mailmanweb.service file.
[Unit] Description=GNU Mailman Web UI After=syslog.target network.target mariadb.service mailman3.service
[Service] Environment="PYTHONPATH=/etc/mailman3/" User=mailman Group=mailman ExecStart=/opt/mailman/venv/bin/uwsgi --ini /etc/mailman3/uwsgi.ini
[Install] WantedBy=multi-user.target
Starting with Debian 11, the MariaDB service is called mariadb and not mysqld or mysql. I tried substituting mysqld and mysql here and rerunning 'systemctl daemon-reload' each time, but restart times were similar, and also produced the same timeout error.
And here is /etc/mailman3/uwsgi.ini:
[uwsgi]
Port on which uwsgi will be listening.
http-socket = 0.0.0.0:8000
If running uwsgi from the virtual environment ...
virtualenv = /opt/mailman/venv/
module=mailman_web.wsgi:application
Add to python import path.
pythonpath = /etc/mailman3/
The default settings module.
env = DJANGO_SETTINGS_MODULE=settings
Setup default number of processes and threads per process.
master = true processes = 2 threads = 2
Setup the django_q related worker processes.
attach-daemon = /opt/mailman/venv/bin/mailman-web qcluster
Setup the request log.
req-logger = file:/opt/mailman/web/logs/uwsgi.log
Log qcluster commands separately.
logger = qcluster file:/opt/mailman/web/logs/uwsgi-qcluster.log log-route = qcluster uwsgi-daemons
Last log and it logs the rest of the stuff.
logger = file:/opt/mailman/web/logs/uwsgi-error.log
What's causing the timeout, and what can I do to speed up restarts? Thanks.
dn
participants (4)
-
David Newman -
Mark Sapiro -
Stephen J. Turnbull -
William Oliver