Server hangs while shutting down

Hey,

  • mattermost.service is identical
  • test server is also CentOS 7

I’m not sure what you mean about removing and replacing mattermost.service. What would I replace it with? I’m going to need to set it up the same surely…?

Here is the content (nothing special). Note that I added TimeoutStopSec after this issue started occurring because I needed to avoid the 90-second downtime while restarting.

[Unit]
Description=Mattermost
After=syslog.target network.target

[Service]
Type=simple
WorkingDirectory=/opt/mattermost
User=mattermost
ExecStart=/bin/bash -lc /opt/mattermost/bin/mattermost
PIDFile=/var/spool/mattermost/pid/master.pid
LimitNOFILE=49152
Restart=always
TimeoutStopSec=5

[Install]
WantedBy=multi-user.target