When shutting down the server via
systemd (which will send
SIGTERM), it hangs and is eventually killed by
Steps to reproduce
Observed on mattermost 5.6.1 and 5.6.2. Running on CentOS7 in
systemd with command
systemctl restart mattermost resulted in very fast shutdown and startup (<1 second).
Recently noticed that the same command hangs, and then
systemd kills the service after 90 seconds.
Dec 31 10:26:04 <server> systemd: Stopping Mattermost... Dec 31 10:27:34 <server> systemd: mattermost.service stop-final-sigterm timed out. Killing. Dec 31 10:27:34 <server> systemd: Unit mattermost.service entered failed state. Dec 31 10:27:34 <server> systemd: mattermost.service failed.
The mattermost log shows:
2018-12-31T10:26:04.315+1100 info jobs/schedulers.go:140 Stopping schedulers. 2018-12-31T10:26:04.316+1100 info jobs/schedulers.go:75 Schedulers stopped. 2018-12-31T10:26:04.316+1100 info jobs/workers.go:176 Stopped workers 2018-12-31T10:26:04.316+1100 info app/app.go:216 Stopping Server... 2018-12-31T10:26:04.316+1100 info app/web_hub.go:120 stopping websocket hub connections
…and then nothing until it starts up again.
Please let me know if there is anything else I can do to get further insight into this.